aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2009-05-04 09:17:31 +0000
committerTravis Howell2009-05-04 09:17:31 +0000
commit42bb8b95bec94165fa204eac9baa17ab1f8a0e78 (patch)
tree6721193c6cf55192d6fadae95797f0a191729667 /engines
parent3fc6c9217276ddaa7e9a6a94db1933647479792c (diff)
downloadscummvm-rg350-42bb8b95bec94165fa204eac9baa17ab1f8a0e78.tar.gz
scummvm-rg350-42bb8b95bec94165fa204eac9baa17ab1f8a0e78.tar.bz2
scummvm-rg350-42bb8b95bec94165fa204eac9baa17ab1f8a0e78.zip
Fix the car chase scene in PN.
svn-id: r40299
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/event.cpp2
-rw-r--r--engines/agos/sound.cpp11
-rw-r--r--engines/agos/sound.h2
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