diff options
Diffstat (limited to 'engines/mads')
-rw-r--r-- | engines/mads/nebular/sound_nebular.cpp | 6 | ||||
-rw-r--r-- | engines/mads/nebular/sound_nebular.h | 2 | ||||
-rw-r--r-- | engines/mads/sound.cpp | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp index b0a0938958..10cbc73bf2 100644 --- a/engines/mads/nebular/sound_nebular.cpp +++ b/engines/mads/nebular/sound_nebular.cpp @@ -211,7 +211,7 @@ ASound::ASound(Audio::Mixer *mixer, OPL::OPL *opl, const Common::String &filenam _mixer = mixer; _opl = opl; - _opl->init(getRate()); + _opl->init(); _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); @@ -861,6 +861,10 @@ int ASound::readBuffer(int16 *buffer, const int numSamples) { return numSamples; } +int ASound::getRate() const { + return g_system->getMixer()->getOutputRate(); +} + void ASound::setVolume(int volume) { _masterVolume = volume; if (!volume) diff --git a/engines/mads/nebular/sound_nebular.h b/engines/mads/nebular/sound_nebular.h index e0956327b4..8c1d7f8021 100644 --- a/engines/mads/nebular/sound_nebular.h +++ b/engines/mads/nebular/sound_nebular.h @@ -385,7 +385,7 @@ public: /** * Return sample rate */ - virtual int getRate() const { return 11025; } + virtual int getRate() const; /** * Set the volume diff --git a/engines/mads/sound.cpp b/engines/mads/sound.cpp index 09bc3a3f13..4a35edb80f 100644 --- a/engines/mads/sound.cpp +++ b/engines/mads/sound.cpp @@ -40,7 +40,7 @@ SoundManager::SoundManager(MADSEngine *vm, Audio::Mixer *mixer) { _masterVolume = 255; _opl = OPL::Config::create(); - _opl->init(11025); + _opl->init(); // Validate sound files switch (_vm->getGameID()) { |