diff options
Diffstat (limited to 'scumm')
| -rw-r--r-- | scumm/imuse_digi.cpp | 6 | ||||
| -rw-r--r-- | scumm/scumm.h | 2 | ||||
| -rw-r--r-- | scumm/scummvm.cpp | 7 | ||||
| -rw-r--r-- | scumm/smush/smush_mixer.cpp | 2 | ||||
| -rw-r--r-- | scumm/smush/smush_mixer.h | 1 | ||||
| -rw-r--r-- | scumm/smush/smush_player.cpp | 1 | ||||
| -rw-r--r-- | scumm/sound.cpp | 2 |
7 files changed, 6 insertions, 15 deletions
diff --git a/scumm/imuse_digi.cpp b/scumm/imuse_digi.cpp index 5cc84e2a75..6ec5293762 100644 --- a/scumm/imuse_digi.cpp +++ b/scumm/imuse_digi.cpp @@ -800,7 +800,7 @@ void IMuseDigital::mixerCallback() { memcpy(buf, _channel[l].data + _channel[l].offset, mixer_size); _channel[l].offset += mixer_size; - if (_scumm->_silentDigitalImuse == false) { + if (_scumm->_mixer->isReady()) { if (!_channel[l].handle.isActive()) _scumm->_mixer->newStream(&_channel[l].handle, _channel[l].freq, _channel[l].mixerFlags, 100000); @@ -1243,7 +1243,7 @@ void IMuseDigital::music_handler(void *refCon) { } void IMuseDigital::playBundleMusic(const char *song) { - if (_scumm->_silentDigitalImuse) { + if (!_scumm->_mixer->isReady()) { return; } @@ -1430,7 +1430,7 @@ void IMuseDigital::playBundleSound(const char *sound, PlayingSoundHandle *handle byte *final; bool result; - if (_scumm->_noDigitalSamples) + if (!_scumm->_mixer->isReady()) return; if (_scumm->_gameId == GID_CMI) { diff --git a/scumm/scumm.h b/scumm/scumm.h index 854de56181..0ae14807e6 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -969,8 +969,6 @@ protected: bool _copyProtection; bool _demoMode; bool _confirmExit; -public: - bool _silentDigitalImuse, _noDigitalSamples; #ifdef INSANE public: diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 2efb368831..9c13d60174 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -459,8 +459,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _defaultTalkDelay = 0; _midiDriver = MD_NULL; tempMusic = 0; - _silentDigitalImuse = 0; - _noDigitalSamples = 0; _saveSound = 0; memset(_extraBoxFlags, 0, sizeof(_extraBoxFlags)); memset(_scaleSlots, 0, sizeof(_scaleSlots)); @@ -707,8 +705,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS #ifndef __GP32__ //ph0x FIXME, "quick dirty hack" /* Bind the mixer to the system => mixer will be invoked * automatically when samples need to be generated */ - _silentDigitalImuse = false; - if (!_mixer->bindToSystem(syst)) { + if (!_mixer->isReady()) { warning("Sound mixer initialization failed"); if (_midiDriver == MD_ADLIB || _midiDriver == MD_PCSPK || @@ -716,8 +713,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _midiDriver = MD_NULL; warning("MIDI driver depends on sound mixer, switching to null MIDI driver"); } - _silentDigitalImuse = true; - _noDigitalSamples = true; } _mixer->setVolume(ConfMan.getInt("sfx_volume") * ConfMan.getInt("master_volume") / 255); _mixer->setMusicVolume(ConfMan.getInt("music_volume")); diff --git a/scumm/smush/smush_mixer.cpp b/scumm/smush/smush_mixer.cpp index 3c9b831d78..69d85c6a22 100644 --- a/scumm/smush/smush_mixer.cpp +++ b/scumm/smush/smush_mixer.cpp @@ -118,7 +118,7 @@ bool SmushMixer::handleFrame() { flags |= SoundMixer::FLAG_UNSIGNED; } - if (_silentMixer == false) { + if (_mixer->isReady()) { if (!_channels[i].handle.isActive()) _mixer->newStream(&_channels[i].handle, rate, flags, 500000); _mixer->appendStream(_channels[i].handle, data, size); diff --git a/scumm/smush/smush_mixer.h b/scumm/smush/smush_mixer.h index 74daa1091d..c0eacd809b 100644 --- a/scumm/smush/smush_mixer.h +++ b/scumm/smush/smush_mixer.h @@ -53,7 +53,6 @@ public: bool handleFrame(); bool stop(); bool update(); - bool _silentMixer; }; } // End of namespace Scumm diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index aa23b1f15e..9491f1e44c 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -252,7 +252,6 @@ void SmushPlayer::init() { _smixer = new SmushMixer(_scumm->_mixer); _scumm->setDirtyColors(0, 255); - _smixer->_silentMixer = _scumm->_silentDigitalImuse; _dst = _scumm->virtscr[0].screenPtr + _scumm->virtscr[0].xstart; g_timer->installTimerProc(&timerCallback, _speed, this); diff --git a/scumm/sound.cpp b/scumm/sound.cpp index a8d94d2ba0..3184674765 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -825,7 +825,7 @@ void Sound::startSfxSound(File *file, int file_size, PlayingSoundHandle *handle, int rate, comp; byte *data; - if (_soundsPaused || _scumm->_noDigitalSamples) + if (_soundsPaused || !_scumm->_mixer->isReady()) return; if (file_size > 0) { |
