aboutsummaryrefslogtreecommitdiff
path: root/engines/queen/sound.cpp
diff options
context:
space:
mode:
authorGregory Montoir2008-07-15 20:26:12 +0000
committerGregory Montoir2008-07-15 20:26:12 +0000
commit2bae0df17e2c2a77295b13b107b208e63147638d (patch)
treeef38718e0e6181d20e0bddc36344e8d78b3efbcf /engines/queen/sound.cpp
parent943b4c2036002454b276e0190dfc2c8919fb0cbf (diff)
downloadscummvm-rg350-2bae0df17e2c2a77295b13b107b208e63147638d.tar.gz
scummvm-rg350-2bae0df17e2c2a77295b13b107b208e63147638d.tar.bz2
scummvm-rg350-2bae0df17e2c2a77295b13b107b208e63147638d.zip
fix bug #1995042: stop previous sfx playback when starting a new sfx (matches original dos code). Also removed the "sound skipping" hack in final bam scene.
svn-id: r33078
Diffstat (limited to 'engines/queen/sound.cpp')
-rw-r--r--engines/queen/sound.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp
index d70fe7209d..3672eecce8 100644
--- a/engines/queen/sound.cpp
+++ b/engines/queen/sound.cpp
@@ -229,11 +229,6 @@ void PCSound::setVolume(int vol) {
_music->setVolume(vol);
}
-void PCSound::waitFinished(bool isSpeech) {
- while (_mixer->isSoundHandleActive(isSpeech ? _speechHandle : _sfxHandle))
- _vm->input()->delay(10);
-}
-
void PCSound::playSound(const char *base, bool isSpeech) {
char name[13];
strcpy(name, base);
@@ -243,7 +238,13 @@ void PCSound::playSound(const char *base, bool isSpeech) {
name[i] = '0';
}
strcat(name, ".SB");
- waitFinished(isSpeech);
+ if (isSpeech) {
+ while (_mixer->isSoundHandleActive(_speechHandle)) {
+ _vm->input()->delay(10);
+ }
+ } else {
+ _mixer->stopHandle(_sfxHandle);
+ }
uint32 size;
Common::File *f = _vm->resource()->findSound(name, &size);
if (f) {