diff options
author | Nipun Garg | 2019-08-03 11:03:42 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:31 +0200 |
commit | c63d716180aa18bafb58636a3982d35d4acf1b9f (patch) | |
tree | 751199267c07c84f9dfd41413ccb5aa912930d66 | |
parent | 7ad5cf9d30ca24ace6709b43fe4549897505c8ab (diff) | |
download | scummvm-rg350-c63d716180aa18bafb58636a3982d35d4acf1b9f.tar.gz scummvm-rg350-c63d716180aa18bafb58636a3982d35d4acf1b9f.tar.bz2 scummvm-rg350-c63d716180aa18bafb58636a3982d35d4acf1b9f.zip |
HDB: Rewind played-out sounds
-rw-r--r-- | engines/hdb/sound.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/hdb/sound.cpp b/engines/hdb/sound.cpp index f713fe8c36..ca7659c329 100644 --- a/engines/hdb/sound.cpp +++ b/engines/hdb/sound.cpp @@ -1500,6 +1500,8 @@ bool Sound::playSound(int index) { _soundCache[index].audioStream = Audio::makeWAVStream(stream, DisposeAfterUse::YES); _soundCache[index].loaded = 1; } + } else { + _soundCache[index].audioStream->rewind(); } int soundChannel = 0; @@ -1529,6 +1531,7 @@ bool Sound::playSound(int index) { false, false ); + return true; } @@ -1559,6 +1562,8 @@ bool Sound::playSoundEx(int index, int channel, bool loop) { _soundCache[index].audioStream = Audio::makeWAVStream(stream, DisposeAfterUse::YES); _soundCache[index].loaded = 1; } + } else { + _soundCache[index].audioStream->rewind(); } g_hdb->_mixer->setChannelVolume(_handles[channel], _sfxVolume); |