From c63d716180aa18bafb58636a3982d35d4acf1b9f Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Sat, 3 Aug 2019 11:03:42 +0530 Subject: HDB: Rewind played-out sounds --- engines/hdb/sound.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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); -- cgit v1.2.3