diff options
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(); |