diff options
author | James Brown | 2002-10-02 10:12:19 +0000 |
---|---|---|
committer | James Brown | 2002-10-02 10:12:19 +0000 |
commit | b7e83decd7b02ce783c3f5a6f8c2075af4851e19 (patch) | |
tree | 9fe721d28591f4a66bc0e600867c4d862408189b /scumm | |
parent | 39a5160985555adda2364ced1cb02cc2dc95965a (diff) | |
download | scummvm-rg350-b7e83decd7b02ce783c3f5a6f8c2075af4851e19.tar.gz scummvm-rg350-b7e83decd7b02ce783c3f5a6f8c2075af4851e19.tar.bz2 scummvm-rg350-b7e83decd7b02ce783c3f5a6f8c2075af4851e19.zip |
Fix 'isSoundRunning' for Creative samples (eg, Full Throttle)
svn-id: r5072
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/sound.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 13ca9a043a..6a492cbef3 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -234,9 +234,9 @@ void Sound::playSound(int sound) { return; } else if (READ_UINT32_UNALIGNED(ptr) == MKID('Crea')) { - char * sound = read_creative_voc_file(ptr, size, rate); - if(sound != NULL) { - _scumm->_mixer->playRaw(NULL, sound, size, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE); + char * sounddata = read_creative_voc_file(ptr, size, rate); + if(sounddata != NULL) { + _scumm->_mixer->playRaw(NULL, sounddata, size, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE, sound); } return; } @@ -553,6 +553,15 @@ int Sound::isSoundRunning(int sound) { if (_scumm->_imuseDigital) { return _scumm->_imuseDigital->getSoundStatus(sound); } + + // Check raw mixer channels, to make sure we're not playing an exotic + // sound type manually. + for (int i = 0; i < _scumm->_mixer->NUM_CHANNELS; i++) { + if (_scumm->_mixer->_channels[i] && (_scumm->_mixer->_channels[i]->_id == sound)) { + return 1; + } + } + se = _scumm->_imuse; if (!se) return 0; |