aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/sound.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-11-30 20:00:50 +0100
committerEugene Sandulenko2016-11-30 20:36:46 +0100
commit6071d1b05ce453c9723452fb858bb66c30c8f24f (patch)
treec1bd23762988d6cc72e4f1672c78d5fcb6126bd0 /engines/fullpipe/sound.cpp
parent7e80a890a85e98192f1fd19683f6a14e43b88a7a (diff)
downloadscummvm-rg350-6071d1b05ce453c9723452fb858bb66c30c8f24f.tar.gz
scummvm-rg350-6071d1b05ce453c9723452fb858bb66c30c8f24f.tar.bz2
scummvm-rg350-6071d1b05ce453c9723452fb858bb66c30c8f24f.zip
FULLPIPE: Restart SFX on request instead of skipping it.
This matches the original and fixes the footstep sounds.
Diffstat (limited to 'engines/fullpipe/sound.cpp')
-rw-r--r--engines/fullpipe/sound.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index fd248f5699..be539bc10e 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -222,8 +222,9 @@ void Sound::setPanAndVolume(int vol, int pan) {
void Sound::play(int flag) {
Audio::SoundHandle *handle = getHandle();
- if (g_fp->_mixer->isSoundHandleActive(*handle))
- return;
+ if (g_fp->_mixer->isSoundHandleActive(*handle)) { // We need to restart the music
+ g_fp->_mixer->stopHandle(*handle);
+ }
byte *soundData = loadData();
Common::MemoryReadStream *dataStream = new Common::MemoryReadStream(soundData, getDataSize());