From bed9da8b9dbbaa19d317f71663e42875c1717fda Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 30 Apr 2015 00:01:30 -0400 Subject: AUDIO: Remove all AudioStream access to OPL --- engines/mads/nebular/sound_nebular.cpp | 12 ------------ engines/mads/nebular/sound_nebular.h | 24 +----------------------- 2 files changed, 1 insertion(+), 35 deletions(-) (limited to 'engines/mads') diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp index 0a1c1ea288..711f82a05b 100644 --- a/engines/mads/nebular/sound_nebular.cpp +++ b/engines/mads/nebular/sound_nebular.cpp @@ -213,16 +213,12 @@ ASound::ASound(Audio::Mixer *mixer, OPL::OPL *opl, const Common::String &filenam command0(); _opl->start(new Common::Functor0Mem(this, &ASound::onTimer), CALLBACKS_PER_SECOND); - _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, - Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } ASound::~ASound() { Common::List::iterator i; for (i = _dataCache.begin(); i != _dataCache.end(); ++i) delete[] (*i)._data; - - _mixer->stopHandle(_soundHandle); } void ASound::validate() { @@ -828,20 +824,12 @@ void ASound::updateFNumber() { write2(8, hiReg, val2); } -int ASound::readBuffer(int16 *data, const int numSamples) { - return _opl->readBuffer(data, numSamples); -} - void ASound::onTimer() { Common::StackLock slock(_driverMutex); poll(); flush(); } -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 1267914e35..2b80b08d89 100644 --- a/engines/mads/nebular/sound_nebular.h +++ b/engines/mads/nebular/sound_nebular.h @@ -145,7 +145,7 @@ struct CachedDataEntry { /** * Base class for the sound player resource files */ -class ASound : public Audio::AudioStream { +class ASound { private: Common::List _dataCache; uint16 _randomSeed; @@ -282,7 +282,6 @@ protected: public: Audio::Mixer *_mixer; OPL::OPL *_opl; - Audio::SoundHandle _soundHandle; AdlibChannel _channels[ADLIB_CHANNEL_COUNT]; AdlibChannel *_activeChannelPtr; AdlibChannelData _channelData[11]; @@ -367,27 +366,6 @@ public: */ CachedDataEntry &getCachedData(byte *pData); - // AudioStream interface - /** - * Main buffer read - */ - virtual int readBuffer(int16 *buffer, const int numSamples); - - /** - * Mono sound only - */ - virtual bool isStereo() const { return false; } - - /** - * Data is continuously pushed, so definitive end - */ - virtual bool endOfData() const { return false; } - - /** - * Return sample rate - */ - virtual int getRate() const; - /** * Set the volume */ -- cgit v1.2.3