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 /engines/sky | |
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 'engines/sky')
-rw-r--r-- | engines/sky/music/adlibmusic.cpp | 19 | ||||
-rw-r--r-- | engines/sky/music/adlibmusic.h | 7 |
2 files changed, 1 insertions, 25 deletions
diff --git a/engines/sky/music/adlibmusic.cpp b/engines/sky/music/adlibmusic.cpp index 3607dfbd13..be5e7b2353 100644 --- a/engines/sky/music/adlibmusic.cpp +++ b/engines/sky/music/adlibmusic.cpp @@ -33,25 +33,18 @@ namespace Sky { AdLibMusic::AdLibMusic(Audio::Mixer *pMixer, Disk *pDisk) : MusicBase(pMixer, pDisk) { _driverFileBase = 60202; - _sampleRate = pMixer->getOutputRate(); _opl = OPL::Config::create(); if (!_opl || !_opl->init()) error("Failed to create OPL"); _opl->start(new Common::Functor0Mem<void, AdLibMusic>(this, &AdLibMusic::onTimer), 50); - _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } AdLibMusic::~AdLibMusic() { - _mixer->stopHandle(_soundHandle); delete _opl; } -int AdLibMusic::readBuffer(int16 *data, const int numSamples) { - return _opl->readBuffer(data, numSamples); -} - void AdLibMusic::onTimer() { if (_musicData != NULL) pollMusic(); @@ -97,16 +90,4 @@ void AdLibMusic::setVolume(uint16 param) { _channels[cnt]->updateVolume(_musicVolume); } -bool AdLibMusic::isStereo() const { - return false; -} - -bool AdLibMusic::endOfData() const { - return false; -} - -int AdLibMusic::getRate() const { - return _sampleRate; -} - } // End of namespace Sky diff --git a/engines/sky/music/adlibmusic.h b/engines/sky/music/adlibmusic.h index fe2e5ac2a5..7b51f2d3a0 100644 --- a/engines/sky/music/adlibmusic.h +++ b/engines/sky/music/adlibmusic.h @@ -32,21 +32,16 @@ class OPL; namespace Sky { -class AdLibMusic : public Audio::AudioStream, public MusicBase { +class AdLibMusic : public MusicBase { public: AdLibMusic(Audio::Mixer *pMixer, Disk *pDisk); ~AdLibMusic(); // AudioStream API - int readBuffer(int16 *buffer, const int numSamples); - bool isStereo() const; - bool endOfData() const; - int getRate() const; virtual void setVolume(uint16 param); private: OPL::OPL *_opl; - Audio::SoundHandle _soundHandle; uint8 *_initSequence; uint32 _sampleRate; virtual void setupPointers(); |