diff options
author | Matthew Hoops | 2015-04-03 01:05:03 -0400 |
---|---|---|
committer | Matthew Hoops | 2015-07-07 20:19:42 -0400 |
commit | 2e8f9dcec93653f1bd1f115662f9fcf3a5581fd8 (patch) | |
tree | e843e3f7de6172b24f4c54b260d663f9c0cc4a80 /engines/mads | |
parent | f1f29302f5401c4782985cec4d47d069b99036ee (diff) | |
download | scummvm-rg350-2e8f9dcec93653f1bd1f115662f9fcf3a5581fd8.tar.gz scummvm-rg350-2e8f9dcec93653f1bd1f115662f9fcf3a5581fd8.tar.bz2 scummvm-rg350-2e8f9dcec93653f1bd1f115662f9fcf3a5581fd8.zip |
AUDIO: Remove the sample rate configuration from the OPL code
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()) { |