diff options
author | Travis Howell | 2005-06-04 06:30:35 +0000 |
---|---|---|
committer | Travis Howell | 2005-06-04 06:30:35 +0000 |
commit | 52a61dda396b867fa4f6983ced25960a1bf22e9d (patch) | |
tree | fa7493f04092c8ae4e5e00ee557c21449dc65315 | |
parent | 0148bbaac5aea11b67793cf3f5d7bfb6369d6f83 (diff) | |
download | scummvm-rg350-52a61dda396b867fa4f6983ced25960a1bf22e9d.tar.gz scummvm-rg350-52a61dda396b867fa4f6983ced25960a1bf22e9d.tar.bz2 scummvm-rg350-52a61dda396b867fa4f6983ced25960a1bf22e9d.zip |
The sound queue needs to be processed, before sfx queue in HE games, since speech is queued.
svn-id: r18330
-rw-r--r-- | scumm/room.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.cpp | 2 | ||||
-rw-r--r-- | scumm/smush/smush_player.cpp | 2 | ||||
-rw-r--r-- | scumm/sound.cpp | 23 | ||||
-rw-r--r-- | scumm/sound.h | 3 |
5 files changed, 21 insertions, 11 deletions
diff --git a/scumm/room.cpp b/scumm/room.cpp index 01e5f26be6..48248dd01e 100644 --- a/scumm/room.cpp +++ b/scumm/room.cpp @@ -76,7 +76,7 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) { killScriptsAndResources(); if (_version >= 4 && _heversion <= 61) stopCycle(0); - _sound->processSoundQues(); + _sound->processSound(); clearDrawQueues(); diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 62c732eba7..a59fc95825 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -2326,7 +2326,7 @@ load_game: playActorSounds(); } - _sound->processSoundQues(); + _sound->processSound(); #ifndef DISABLE_SCUMM_7_8 if (_imuseDigital) { diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index 2882001494..379bb5d4f1 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -1057,7 +1057,7 @@ void SmushPlayer::parseNextFrame() { delete sub; if (_insanity) - _vm->_sound->processSoundQues(); + _vm->_sound->processSound(); _vm->_imuseDigital->flushTracks(); } diff --git a/scumm/sound.cpp b/scumm/sound.cpp index b21e8a32ab..7382ee113c 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -114,16 +114,25 @@ void Sound::addSoundToQueue2(int sound, int heOffset, int heChannel, int heFlags _soundQue2Pos++; } -void Sound::processSoundQues() { +void Sound::processSound() { + if (_vm->_heversion >= 60) { + processSoundQueues(); + processSfxQueues(); + } else { + processSfxQueues(); + + if (_vm->_features & GF_DIGI_IMUSE) + return; + + processSoundQueues(); + } +} + +void Sound::processSoundQueues() { int i = 0, num; int snd, heOffset, heChannel, heFlags; int data[16]; - processSfxQueues(); - - if (_vm->_features & GF_DIGI_IMUSE) - return; - while (_soundQue2Pos) { _soundQue2Pos--; snd = _soundQue2[_soundQue2Pos].sound; @@ -1030,7 +1039,7 @@ void Sound::soundKludge(int *list, int num) { #endif if (list[0] == -1) { - processSoundQues(); + processSound(); } else { _soundQue[_soundQuePos++] = num; diff --git a/scumm/sound.h b/scumm/sound.h index 2110abace6..308d966733 100644 --- a/scumm/sound.h +++ b/scumm/sound.h @@ -106,7 +106,8 @@ public: ~Sound(); void addSoundToQueue(int sound, int heOffset = 0, int heChannel = 0, int heFlags = 0); void addSoundToQueue2(int sound, int heOffset = 0, int heChannel = 0, int heFlags = 0); - void processSoundQues(); + void processSound(); + void processSoundQueues(); void setOverrideFreq(int freq); void playSound(int soundID, int heOffset, int heChannel, int heFlags); void startHETalkSound(uint32 offset); |