diff options
author | Strangerke | 2014-12-27 16:05:23 +0100 |
---|---|---|
committer | Strangerke | 2014-12-27 16:06:32 +0100 |
commit | 6fe9bdf6c6f63320e351c348970c2864af708c42 (patch) | |
tree | d1af6bf056d2065a747c3938f65b9c407705f210 /engines/access | |
parent | b3712cc877482e150a3532fa0f21f5c03dc839f1 (diff) | |
download | scummvm-rg350-6fe9bdf6c6f63320e351c348970c2864af708c42.tar.gz scummvm-rg350-6fe9bdf6c6f63320e351c348970c2864af708c42.tar.bz2 scummvm-rg350-6fe9bdf6c6f63320e351c348970c2864af708c42.zip |
ACCESS: Fix speech
Diffstat (limited to 'engines/access')
-rw-r--r-- | engines/access/access.cpp | 6 | ||||
-rw-r--r-- | engines/access/sound.cpp | 4 | ||||
-rw-r--r-- | engines/access/sound.h | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp index 67255ff5ea..080a8ef975 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -227,7 +227,8 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) { _sound->playSound(0); _scripts->cmdFreeSound(); - _events->pollEvents(); + while(_sound->isSFXPlaying() && !shouldQuit()) + _events->pollEvents(); if (_events->isKeyMousePressed()) { _sndSubFile += soundsLeft; @@ -258,7 +259,8 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) { _sound->playSound(0); _scripts->cmdFreeSound(); - _events->pollEvents(); + while(_sound->isSFXPlaying() && !shouldQuit()) + _events->pollEvents(); if (_events->_leftButton) { _events->debounceLeft(); diff --git a/engines/access/sound.cpp b/engines/access/sound.cpp index 82199a8286..cfc8b7a64c 100644 --- a/engines/access/sound.cpp +++ b/engines/access/sound.cpp @@ -162,6 +162,10 @@ void SoundManager::checkSoundQueue() { DisposeAfterUse::YES); } +bool SoundManager::isSFXPlaying() { + return _mixer->isSoundHandleActive(_effectsHandle); +} + void SoundManager::loadSounds(Common::Array<RoomInfo::SoundIdent> &sounds) { debugC(1, kDebugSound, "loadSounds"); diff --git a/engines/access/sound.h b/engines/access/sound.h index c276648477..3646c2cc16 100644 --- a/engines/access/sound.h +++ b/engines/access/sound.h @@ -66,6 +66,7 @@ public: void playSound(int soundIndex); void checkSoundQueue(); + bool isSFXPlaying(); Resource *loadSound(int fileNum, int subfile); void loadSounds(Common::Array<RoomInfo::SoundIdent> &sounds); |