diff options
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r-- | engines/mads/nebular/sound_nebular.cpp | 6 | ||||
-rw-r--r-- | engines/mads/nebular/sound_nebular.h | 2 |
2 files changed, 6 insertions, 2 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 |