diff options
author | Einar Johan Trøan Sømåen | 2012-08-14 17:26:46 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-08-14 17:26:46 +0200 |
commit | 209488c6cf87fc9c7f7adf005d7bad5a1f5428a8 (patch) | |
tree | b313b9322380d370dca62569a9e59ce1baf17ed9 | |
parent | fb566386c74c823f98c089ef088ec997d5ce1371 (diff) | |
download | scummvm-rg350-209488c6cf87fc9c7f7adf005d7bad5a1f5428a8.tar.gz scummvm-rg350-209488c6cf87fc9c7f7adf005d7bad5a1f5428a8.tar.bz2 scummvm-rg350-209488c6cf87fc9c7f7adf005d7bad5a1f5428a8.zip |
WINTERMUTE: Save the loop-state of sounds properly.
-rw-r--r-- | engines/wintermute/base/sound/base_sound_buffer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/wintermute/base/sound/base_sound_buffer.cpp b/engines/wintermute/base/sound/base_sound_buffer.cpp index 14bbcd9421..b94f0d8215 100644 --- a/engines/wintermute/base/sound/base_sound_buffer.cpp +++ b/engines/wintermute/base/sound/base_sound_buffer.cpp @@ -137,10 +137,12 @@ bool BaseSoundBuffer::play(bool looping, uint32 startSample) { delete _handle;
_handle = NULL;
}
+ // Store the loop-value for save-games.
+ setLooping(looping);
if (_stream) {
_stream->seek(startSample);
_handle = new Audio::SoundHandle;
- if (looping) {
+ if (_looping) {
Audio::AudioStream *loopStream = new Audio::LoopingAudioStream(_stream, 0, DisposeAfterUse::NO);
g_system->getMixer()->playStream(_type, _handle, loopStream, -1, _volume, 0, DisposeAfterUse::YES);
} else {
|