diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/event.cpp | 2 | ||||
-rw-r--r-- | engines/agos/sound.cpp | 11 | ||||
-rw-r--r-- | engines/agos/sound.h | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index ff3789c03f..605ef8e119 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -620,7 +620,7 @@ void AGOSEngine_PN::timerProc() { _videoLockOut |= 2; - _sound->handleSound(); + _sound->handleSoundQueue(); handleMouseMoved(); handleKeyboard(); diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp index 77324a072d..d20c07a8c8 100644 --- a/engines/agos/sound.cpp +++ b/engines/agos/sound.cpp @@ -700,12 +700,17 @@ void Sound::ambientPause(bool b) { } // Personal Nightmare specific -void Sound::handleSound() { - if (_soundQueuePtr && !isSfxActive()) { +void Sound::handleSoundQueue() { + if (isSfxActive()) + return; + + _vm->_sampleEnd = 1; + + if (_soundQueuePtr) { playRawData(_soundQueuePtr, _soundQueueNum, _soundQueueSize, _soundQueueFreq); _vm->_sampleWait = 1; - _vm->_sampleEnd = 1; + _vm->_sampleEnd = 0; _soundQueuePtr = 0; _soundQueueNum = 0; _soundQueueSize = 0; diff --git a/engines/agos/sound.h b/engines/agos/sound.h index be7aa6c076..9812a0571c 100644 --- a/engines/agos/sound.h +++ b/engines/agos/sound.h @@ -90,7 +90,7 @@ public: void playAmbient(uint sound); // Personal Nightmare specfic - void handleSound(); + void handleSoundQueue(); void queueSound(byte *ptr, uint16 sound, uint32 size, uint16 freq); // Elvira 1/2 and Waxworks specific |