aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/sound.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index a87bc835ec..19be224356 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -349,8 +349,12 @@ void Sound::playSound(int soundID) {
}
size -= waveSize;
- Audio::SeekableAudioStream *s = Audio::makeRawStream(sound, waveSize, rate, Audio::FLAG_UNSIGNED);
- stream = new Audio::SubLoopingAudioStream(s, 0, Audio::Timestamp(0, loopStart, rate), Audio::Timestamp(0, loopEnd, rate));
+ if (loopEnd > 0) {
+ Audio::SeekableAudioStream *s = Audio::makeRawStream(sound, waveSize, rate, Audio::FLAG_UNSIGNED);
+ stream = new Audio::SubLoopingAudioStream(s, 0, Audio::Timestamp(0, loopStart, rate), Audio::Timestamp(0, loopEnd, rate));
+ } else {
+ stream = Audio::makeRawStream(sound, waveSize, rate, Audio::FLAG_UNSIGNED);
+ }
_mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID, 255, 0);
}
break;