From 0cff5c547c4051f920fde17f772bad4634895be9 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 8 May 2012 16:48:01 +0100 Subject: DREAMWEB: Add _speechDirName to remove duplication of Directory name. --- engines/dreamweb/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/dreamweb/sound.cpp') diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index b51527a8cd..800936e8e8 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -177,7 +177,7 @@ bool DreamWebEngine::loadSpeech(const Common::String &filename) { return false; Common::File file; - if (!file.open("speech/" + filename)) + if (!file.open(_speechDirName + "/" + filename)) return false; debug(1, "loadSpeech(%s)", filename.c_str()); -- cgit v1.2.3 From 45974a1bf03b25cd6a191702b190478cc4c1007e Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 22 May 2012 16:31:23 +0100 Subject: DREAMWEB: Increased debugging output from sound related code. This code is intended as temporary debugging code to aid investigation of bug #3528164 - "DREAMWEB: missing sound effects/music cues during main title" and can be removed once this bug is fixed. --- engines/dreamweb/sound.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'engines/dreamweb/sound.cpp') diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index 800936e8e8..b3d5db9e0d 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -55,6 +55,7 @@ void DreamWebEngine::volumeAdjust() { } void DreamWebEngine::playChannel0(uint8 index, uint8 repeat) { + debug(1, "playChannel0(index:%d, repeat:%d)", index, repeat); _channel0Playing = index; if (index >= 12) index -= 12; @@ -72,6 +73,7 @@ void DreamWebEngine::playChannel1(uint8 index) { } void DreamWebEngine::cancelCh0() { + debug(1, "cancelCh0()"); _channel0Repeat = 0; _channel0Playing = 255; stopSound(0); @@ -83,6 +85,7 @@ void DreamWebEngine::cancelCh1() { } void DreamWebEngine::loadRoomsSample() { + debug(1, "loadRoomsSample() _roomsSample:%d", _roomsSample); uint8 sample = _roomsSample; if (sample == 255 || _currentSample == sample) @@ -190,6 +193,11 @@ bool DreamWebEngine::loadSpeech(const Common::String &filename) { } void DreamWebEngine::soundHandler() { + static uint8 volumeOld = 0, channel0Old = 0, channel0PlayingOld = 0; + if (_volume != volumeOld || _channel0 != channel0Old || _channel0Playing != channel0PlayingOld) + debug(1, "soundHandler() _volume: %d _channel0: %d _channel0Playing: %d", _volume, _channel0, _channel0Playing); + volumeOld = _volume, channel0Old = _channel0, channel0PlayingOld = _channel0Playing; + _subtitles = ConfMan.getBool("subtitles"); volumeAdjust(); @@ -230,6 +238,8 @@ void DreamWebEngine::soundHandler() { } } if (!_mixer->isSoundHandleActive(_channelHandle[0])) { + if (_channel0Playing != 255 && _channel0 != 0) + debug(1, "!_mixer->isSoundHandleActive _channelHandle[0] _channel0Playing:%d _channel0:%d", _channel0Playing, _channel0); _channel0Playing = 255; _channel0 = 0; } @@ -237,7 +247,6 @@ void DreamWebEngine::soundHandler() { _channel1Playing = 255; _channel1 = 0; } - } void DreamWebEngine::loadSounds(uint bank, const Common::String &suffix) { -- cgit v1.2.3 From 96ae10c7491aed3258912ef91c8787b7975376ad Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 30 May 2012 03:53:52 +0100 Subject: DREAMWEB: Removal of dead code and cleanup in sound code. The removed blocks in the playChannel functions referencing index are non-functional leftovers from more complex logic in the original code structure, and thus can be safely removed. --- engines/dreamweb/sound.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'engines/dreamweb/sound.cpp') diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index b3d5db9e0d..fcbcb9d0a0 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -40,7 +40,6 @@ bool DreamWebEngine::loadSpeech(byte type1, int idx1, byte type2, int idx2) { return result; } - void DreamWebEngine::volumeAdjust() { if (_volumeDirection == 0) return; @@ -57,9 +56,6 @@ void DreamWebEngine::volumeAdjust() { void DreamWebEngine::playChannel0(uint8 index, uint8 repeat) { debug(1, "playChannel0(index:%d, repeat:%d)", index, repeat); _channel0Playing = index; - if (index >= 12) - index -= 12; - _channel0Repeat = repeat; } @@ -68,14 +64,12 @@ void DreamWebEngine::playChannel1(uint8 index) { return; _channel1Playing = index; - if (index >= 12) - index -= 12; } void DreamWebEngine::cancelCh0() { debug(1, "cancelCh0()"); - _channel0Repeat = 0; _channel0Playing = 255; + _channel0Repeat = 0; stopSound(0); } @@ -104,11 +98,6 @@ void DreamWebEngine::loadRoomsSample() { loadSounds(1, sampleSuffix.c_str()); } -} // End of namespace DreamWeb - - -namespace DreamWeb { - void DreamWebEngine::playSound(uint8 channel, uint8 id, uint8 loops) { debug(1, "playSound(%u, %u, %u)", channel, id, loops); -- cgit v1.2.3 From 628cfa3d47fb7ebad8dd26cb59f485e5c70dacb5 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 31 May 2012 05:16:10 +0100 Subject: DREAMWEB: Objectify Sound functions & data into DreamWebSound class. This change should have no functional change, but makes the sound code more decoupled, modular and readable, prior to attempting a fix for bug #3528164 - "DREAMWEB: missing sound effects/music cues during main title". --- engines/dreamweb/sound.cpp | 90 +++++++++++++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 33 deletions(-) (limited to 'engines/dreamweb/sound.cpp') diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index fcbcb9d0a0..83ddebc552 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -20,27 +20,52 @@ * */ -#include "dreamweb/dreamweb.h" - -#include "audio/mixer.h" #include "audio/decoders/raw.h" - #include "common/config-manager.h" +#include "common/debug.h" +#include "common/file.h" + +#include "dreamweb/dreamweb.h" +#include "dreamweb/sound.h" namespace DreamWeb { -bool DreamWebEngine::loadSpeech(byte type1, int idx1, byte type2, int idx2) { +DreamWebSound::DreamWebSound(DreamWebEngine *vm) : _vm(vm) { + _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); + _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); + _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); + + _channel0 = 0; + _channel1 = 0; + + _currentSample = 0xff; + _channel0Playing = 0; + _channel0Repeat = 0; + _channel1Playing = 255; + + _volume = 0; + _volumeTo = 0; + _volumeDirection = 0; + _volumeCount = 0; +} + +DreamWebSound::~DreamWebSound() { +} + +bool DreamWebSound::loadSpeech(byte type1, int idx1, byte type2, int idx2) { cancelCh1(); Common::String name = Common::String::format("%c%02d%c%04d.RAW", type1, idx1, type2, idx2); - //debug("name = %s", name.c_str()); - bool result = loadSpeech(name); + debug(2, "loadSpeech() name:%s", name.c_str()); + return loadSpeech(name); +} - _speechLoaded = result; - return result; +void DreamWebSound::volumeChange(uint8 value, int8 direction) { + _volumeTo = value; + _volumeDirection = direction; } -void DreamWebEngine::volumeAdjust() { +void DreamWebSound::volumeAdjust() { if (_volumeDirection == 0) return; if (_volume != _volumeTo) { @@ -53,34 +78,33 @@ void DreamWebEngine::volumeAdjust() { } } -void DreamWebEngine::playChannel0(uint8 index, uint8 repeat) { +void DreamWebSound::playChannel0(uint8 index, uint8 repeat) { debug(1, "playChannel0(index:%d, repeat:%d)", index, repeat); _channel0Playing = index; _channel0Repeat = repeat; } -void DreamWebEngine::playChannel1(uint8 index) { +void DreamWebSound::playChannel1(uint8 index) { if (_channel1Playing == 7) return; _channel1Playing = index; } -void DreamWebEngine::cancelCh0() { +void DreamWebSound::cancelCh0() { debug(1, "cancelCh0()"); _channel0Playing = 255; _channel0Repeat = 0; stopSound(0); } -void DreamWebEngine::cancelCh1() { +void DreamWebSound::cancelCh1() { _channel1Playing = 255; stopSound(1); } -void DreamWebEngine::loadRoomsSample() { - debug(1, "loadRoomsSample() _roomsSample:%d", _roomsSample); - uint8 sample = _roomsSample; +void DreamWebSound::loadRoomsSample(uint8 sample) { + debug(1, "loadRoomsSample(sample:%d)", sample); if (sample == 255 || _currentSample == sample) return; // loaded already @@ -98,7 +122,7 @@ void DreamWebEngine::loadRoomsSample() { loadSounds(1, sampleSuffix.c_str()); } -void DreamWebEngine::playSound(uint8 channel, uint8 id, uint8 loops) { +void DreamWebSound::playSound(uint8 channel, uint8 id, uint8 loops) { debug(1, "playSound(%u, %u, %u)", channel, id, loops); int bank = 0; @@ -149,27 +173,27 @@ void DreamWebEngine::playSound(uint8 channel, uint8 id, uint8 loops) { } else stream = raw; - if (_mixer->isSoundHandleActive(_channelHandle[channel])) - _mixer->stopHandle(_channelHandle[channel]); - _mixer->playStream(type, &_channelHandle[channel], stream); + if (_vm->_mixer->isSoundHandleActive(_channelHandle[channel])) + _vm->_mixer->stopHandle(_channelHandle[channel]); + _vm->_mixer->playStream(type, &_channelHandle[channel], stream); } -void DreamWebEngine::stopSound(uint8 channel) { +void DreamWebSound::stopSound(uint8 channel) { debug(1, "stopSound(%u)", channel); assert(channel == 0 || channel == 1); - _mixer->stopHandle(_channelHandle[channel]); + _vm->_mixer->stopHandle(_channelHandle[channel]); if (channel == 0) _channel0 = 0; else _channel1 = 0; } -bool DreamWebEngine::loadSpeech(const Common::String &filename) { - if (!hasSpeech()) +bool DreamWebSound::loadSpeech(const Common::String &filename) { + if (!_vm->hasSpeech()) return false; Common::File file; - if (!file.open(_speechDirName + "/" + filename)) + if (!file.open(_vm->getSpeechDirName() + "/" + filename)) return false; debug(1, "loadSpeech(%s)", filename.c_str()); @@ -181,13 +205,13 @@ bool DreamWebEngine::loadSpeech(const Common::String &filename) { return true; } -void DreamWebEngine::soundHandler() { +void DreamWebSound::soundHandler() { static uint8 volumeOld = 0, channel0Old = 0, channel0PlayingOld = 0; if (_volume != volumeOld || _channel0 != channel0Old || _channel0Playing != channel0PlayingOld) debug(1, "soundHandler() _volume: %d _channel0: %d _channel0Playing: %d", _volume, _channel0, _channel0Playing); volumeOld = _volume, channel0Old = _channel0, channel0PlayingOld = _channel0Playing; - _subtitles = ConfMan.getBool("subtitles"); + _vm->_subtitles = ConfMan.getBool("subtitles"); volumeAdjust(); uint volume = _volume; @@ -204,7 +228,7 @@ void DreamWebEngine::soundHandler() { if (volume >= 8) volume = 7; volume = (8 - volume) * Audio::Mixer::kMaxChannelVolume / 8; - _mixer->setChannelVolume(_channelHandle[0], volume); + _vm->_mixer->setChannelVolume(_channelHandle[0], volume); uint8 ch0 = _channel0Playing; if (ch0 == 255) @@ -226,20 +250,20 @@ void DreamWebEngine::soundHandler() { playSound(1, ch1, 1); } } - if (!_mixer->isSoundHandleActive(_channelHandle[0])) { + if (!_vm->_mixer->isSoundHandleActive(_channelHandle[0])) { if (_channel0Playing != 255 && _channel0 != 0) debug(1, "!_mixer->isSoundHandleActive _channelHandle[0] _channel0Playing:%d _channel0:%d", _channel0Playing, _channel0); _channel0Playing = 255; _channel0 = 0; } - if (!_mixer->isSoundHandleActive(_channelHandle[1])) { + if (!_vm->_mixer->isSoundHandleActive(_channelHandle[1])) { _channel1Playing = 255; _channel1 = 0; } } -void DreamWebEngine::loadSounds(uint bank, const Common::String &suffix) { - Common::String filename = getDatafilePrefix() + suffix; +void DreamWebSound::loadSounds(uint bank, const Common::String &suffix) { + Common::String filename = _vm->getDatafilePrefix() + suffix; debug(1, "loadSounds(%u, %s)", bank, filename.c_str()); Common::File file; if (!file.open(filename)) { -- cgit v1.2.3 From d9983a6224dcc82d56a7b3d6d2aaad79def96766 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 2 Jun 2012 07:03:40 +0100 Subject: DREAMWEB: Cleanup of debugging code and formatting in sound code. This commit removes various temporary debugging output, cleans up some points of formatting and replaces some hexadecimal sizes and offsets with decimal for readability. --- engines/dreamweb/sound.cpp | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) (limited to 'engines/dreamweb/sound.cpp') diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index 83ddebc552..4b636d4789 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -85,6 +85,7 @@ void DreamWebSound::playChannel0(uint8 index, uint8 repeat) { } void DreamWebSound::playChannel1(uint8 index) { + debug(1, "playChannel1(index:%d)", index); if (_channel1Playing == 7) return; @@ -99,6 +100,7 @@ void DreamWebSound::cancelCh0() { } void DreamWebSound::cancelCh1() { + debug(1, "cancelCh1()"); _channel1Playing = 255; stopSound(1); } @@ -123,7 +125,7 @@ void DreamWebSound::loadRoomsSample(uint8 sample) { } void DreamWebSound::playSound(uint8 channel, uint8 id, uint8 loops) { - debug(1, "playSound(%u, %u, %u)", channel, id, loops); + debug(1, "playSound(channel:%u, id:%u, loops:%u)", channel, id, loops); int bank = 0; bool speech = false; @@ -153,23 +155,18 @@ void DreamWebSound::playSound(uint8 channel, uint8 id, uint8 loops) { error("out of memory: cannot allocate memory for sound(%u bytes)", sample.size); memcpy(buffer, data.data.begin() + sample.offset, sample.size); - raw = Audio::makeRawStream( - buffer, - sample.size, 22050, Audio::FLAG_UNSIGNED); + raw = Audio::makeRawStream(buffer, sample.size, 22050, Audio::FLAG_UNSIGNED); } else { uint8 *buffer = (uint8 *)malloc(_speechData.size()); if (!buffer) error("out of memory: cannot allocate memory for sound(%u bytes)", _speechData.size()); memcpy(buffer, _speechData.begin(), _speechData.size()); - raw = Audio::makeRawStream( - buffer, - _speechData.size(), 22050, Audio::FLAG_UNSIGNED); - + raw = Audio::makeRawStream(buffer, _speechData.size(), 22050, Audio::FLAG_UNSIGNED); } Audio::AudioStream *stream; if (loops > 1) { - stream = new Audio::LoopingAudioStream(raw, loops < 255? loops: 0); + stream = new Audio::LoopingAudioStream(raw, (loops < 255) ? loops : 0); } else stream = raw; @@ -206,11 +203,6 @@ bool DreamWebSound::loadSpeech(const Common::String &filename) { } void DreamWebSound::soundHandler() { - static uint8 volumeOld = 0, channel0Old = 0, channel0PlayingOld = 0; - if (_volume != volumeOld || _channel0 != channel0Old || _channel0Playing != channel0PlayingOld) - debug(1, "soundHandler() _volume: %d _channel0: %d _channel0Playing: %d", _volume, _channel0, _channel0Playing); - volumeOld = _volume, channel0Old = _channel0, channel0PlayingOld = _channel0Playing; - _vm->_subtitles = ConfMan.getBool("subtitles"); volumeAdjust(); @@ -250,9 +242,8 @@ void DreamWebSound::soundHandler() { playSound(1, ch1, 1); } } + if (!_vm->_mixer->isSoundHandleActive(_channelHandle[0])) { - if (_channel0Playing != 255 && _channel0 != 0) - debug(1, "!_mixer->isSoundHandleActive _channelHandle[0] _channel0Playing:%d _channel0:%d", _channel0Playing, _channel0); _channel0Playing = 255; _channel0 = 0; } @@ -271,9 +262,9 @@ void DreamWebSound::loadSounds(uint bank, const Common::String &suffix) { return; } - uint8 header[0x60]; + uint8 header[96]; file.read(header, sizeof(header)); - uint tablesize = READ_LE_UINT16(header + 0x32); + uint tablesize = READ_LE_UINT16(header + 50); debug(1, "table size = %u", tablesize); SoundData &soundData = _soundData[bank]; @@ -283,8 +274,8 @@ void DreamWebSound::loadSounds(uint bank, const Common::String &suffix) { uint8 entry[6]; Sample &sample = soundData.samples[i]; file.read(entry, sizeof(entry)); - sample.offset = entry[0] * 0x4000 + READ_LE_UINT16(entry + 1); - sample.size = READ_LE_UINT16(entry + 3) * 0x800; + sample.offset = entry[0] * 16384 + READ_LE_UINT16(entry + 1); + sample.size = READ_LE_UINT16(entry + 3) * 2048; total += sample.size; debug(1, "offset: %08x, size: %u", sample.offset, sample.size); } -- cgit v1.2.3 From db77b9e4a7f8491d45b47b539af2077fb15e9376 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 2 Jun 2012 22:28:34 +0100 Subject: DREAMWEB: Modify sound code to prevent missing sound effects. This should fix bug #3528164 "DREAMWEB: missing sound effects/music cues during main title" by preventing repeated calls of SFX id 12 being lost if the next call is made before the sound handler has cleared the previous one. --- engines/dreamweb/sound.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'engines/dreamweb/sound.cpp') diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index 4b636d4789..76c734e932 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -41,6 +41,7 @@ DreamWebSound::DreamWebSound(DreamWebEngine *vm) : _vm(vm) { _currentSample = 0xff; _channel0Playing = 0; _channel0Repeat = 0; + _channel0NewSound = false; _channel1Playing = 255; _volume = 0; @@ -80,6 +81,12 @@ void DreamWebSound::volumeAdjust() { void DreamWebSound::playChannel0(uint8 index, uint8 repeat) { debug(1, "playChannel0(index:%d, repeat:%d)", index, repeat); + + if (index == _channel0Playing) { + warning("playChannel0(index: %d) already playing! Forcing restart...", index); + _channel0NewSound = true; + } + _channel0Playing = index; _channel0Repeat = repeat; } @@ -230,8 +237,9 @@ void DreamWebSound::soundHandler() { ch1 = 0; uint8 ch0loop = _channel0Repeat; - if (_channel0 != ch0) { + if (_channel0 != ch0 || _channel0NewSound) { _channel0 = ch0; + _channel0NewSound = false; if (ch0) { playSound(0, ch0, ch0loop); } -- cgit v1.2.3 From 7d29e4017d37f7aee4035b3d7288c8c5478633be Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 5 Jun 2012 01:00:01 +0100 Subject: DREAMWEB: Modify Sound code to better match original behaviour. This fixes bug #3531635 - "DREAMWEB: doors don't play "open" sound when opening". In addition, the resultant code is simpler and should better match the original behaviour and a basic playtest has not shown any regressions. --- engines/dreamweb/sound.cpp | 42 +++++++++++------------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) (limited to 'engines/dreamweb/sound.cpp') diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index 76c734e932..570f76f2f9 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -35,14 +35,12 @@ DreamWebSound::DreamWebSound(DreamWebEngine *vm) : _vm(vm) { _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); - _channel0 = 0; - _channel1 = 0; - _currentSample = 0xff; - _channel0Playing = 0; + _channel0Playing = 255; _channel0Repeat = 0; _channel0NewSound = false; _channel1Playing = 255; + _channel1NewSound = false; _volume = 0; _volumeTo = 0; @@ -82,13 +80,9 @@ void DreamWebSound::volumeAdjust() { void DreamWebSound::playChannel0(uint8 index, uint8 repeat) { debug(1, "playChannel0(index:%d, repeat:%d)", index, repeat); - if (index == _channel0Playing) { - warning("playChannel0(index: %d) already playing! Forcing restart...", index); - _channel0NewSound = true; - } - _channel0Playing = index; _channel0Repeat = repeat; + _channel0NewSound = true; } void DreamWebSound::playChannel1(uint8 index) { @@ -97,6 +91,7 @@ void DreamWebSound::playChannel1(uint8 index) { return; _channel1Playing = index; + _channel1NewSound = true; } void DreamWebSound::cancelCh0() { @@ -186,10 +181,6 @@ void DreamWebSound::stopSound(uint8 channel) { debug(1, "stopSound(%u)", channel); assert(channel == 0 || channel == 1); _vm->_mixer->stopHandle(_channelHandle[channel]); - if (channel == 0) - _channel0 = 0; - else - _channel1 = 0; } bool DreamWebSound::loadSpeech(const Common::String &filename) { @@ -229,35 +220,24 @@ void DreamWebSound::soundHandler() { volume = (8 - volume) * Audio::Mixer::kMaxChannelVolume / 8; _vm->_mixer->setChannelVolume(_channelHandle[0], volume); - uint8 ch0 = _channel0Playing; - if (ch0 == 255) - ch0 = 0; - uint8 ch1 = _channel1Playing; - if (ch1 == 255) - ch1 = 0; - uint8 ch0loop = _channel0Repeat; - - if (_channel0 != ch0 || _channel0NewSound) { - _channel0 = ch0; + if (_channel0NewSound) { _channel0NewSound = false; - if (ch0) { - playSound(0, ch0, ch0loop); + if (_channel0Playing != 255) { + playSound(0, _channel0Playing, _channel0Repeat); } } - if (_channel1 != ch1) { - _channel1 = ch1; - if (ch1) { - playSound(1, ch1, 1); + if (_channel1NewSound) { + _channel1NewSound = false; + if (_channel1Playing != 255) { + playSound(1, _channel1Playing, 1); } } if (!_vm->_mixer->isSoundHandleActive(_channelHandle[0])) { _channel0Playing = 255; - _channel0 = 0; } if (!_vm->_mixer->isSoundHandleActive(_channelHandle[1])) { _channel1Playing = 255; - _channel1 = 0; } } -- cgit v1.2.3