diff options
author | Matthew Hoops | 2015-04-30 00:01:30 -0400 |
---|---|---|
committer | Matthew Hoops | 2015-07-07 20:19:47 -0400 |
commit | bed9da8b9dbbaa19d317f71663e42875c1717fda (patch) | |
tree | 56b714515cae107ae1f7992a2e85db1e9c800a8a /audio/fmopl.cpp | |
parent | 8bcbcd6c167e8e7169f006da459f3cbe450a4a59 (diff) | |
download | scummvm-rg350-bed9da8b9dbbaa19d317f71663e42875c1717fda.tar.gz scummvm-rg350-bed9da8b9dbbaa19d317f71663e42875c1717fda.tar.bz2 scummvm-rg350-bed9da8b9dbbaa19d317f71663e42875c1717fda.zip |
AUDIO: Remove all AudioStream access to OPL
Diffstat (limited to 'audio/fmopl.cpp')
-rw-r--r-- | audio/fmopl.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/audio/fmopl.cpp b/audio/fmopl.cpp index 9af7afff54..4bc902eba0 100644 --- a/audio/fmopl.cpp +++ b/audio/fmopl.cpp @@ -188,7 +188,8 @@ bool OPL::_hasInstance = false; EmulatedOPL::EmulatedOPL() : _nextTick(0), _samplesPerTick(0), - _baseFreq(0) { + _baseFreq(0), + _handle(new Audio::SoundHandle()) { } EmulatedOPL::~EmulatedOPL() { @@ -197,6 +198,8 @@ EmulatedOPL::~EmulatedOPL() { // needs to call stop() or the pointer can still use be used in // the mixer thread at the same time. stop(); + + delete _handle; } int EmulatedOPL::readBuffer(int16 *buffer, const int numSamples) { @@ -232,13 +235,11 @@ int EmulatedOPL::getRate() const { void EmulatedOPL::startCallbacks(int timerFrequency) { setCallbackFrequency(timerFrequency); - // TODO: Eventually start mixer playback here - //g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, _handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, _handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } void EmulatedOPL::stopCallbacks() { - // TODO: Eventually stop mixer playback here - //g_system->getMixer()->stopHandle(*_handle); + g_system->getMixer()->stopHandle(*_handle); } void EmulatedOPL::setCallbackFrequency(int timerFrequency) { |