diff options
Diffstat (limited to 'engines/cruise')
| -rw-r--r-- | engines/cruise/sound.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp index 7d48e6e139..f57435f4f7 100644 --- a/engines/cruise/sound.cpp +++ b/engines/cruise/sound.cpp @@ -108,7 +108,7 @@ struct VolumeEntry { int adjusted; }; -class AdLibSoundDriver : public PCSoundDriver, Audio::AudioStream { +class AdLibSoundDriver : public PCSoundDriver { public: AdLibSoundDriver(Audio::Mixer *mixer); virtual ~AdLibSoundDriver(); @@ -118,12 +118,6 @@ public: virtual void stopChannel(int channel); virtual void stopAll(); - // AudioStream interface - virtual int readBuffer(int16 *buffer, const int numSamples); - virtual bool isStereo() const { return false; } - virtual bool endOfData() const { return false; } - virtual int getRate() const { return _sampleRate; } - void initCard(); void onTimer(); void setupInstrument(const byte *data, int channel); @@ -136,9 +130,7 @@ public: protected: OPL::OPL *_opl; - int _sampleRate; Audio::Mixer *_mixer; - Audio::SoundHandle _soundHandle; byte _vibrato; VolumeEntry _channelsVolumeTable[5]; @@ -302,7 +294,6 @@ void PCSoundDriver::syncSounds() { AdLibSoundDriver::AdLibSoundDriver(Audio::Mixer *mixer) : _mixer(mixer) { - _sampleRate = _mixer->getOutputRate(); _opl = OPL::Config::create(); if (!_opl || !_opl->init()) error("Failed to create OPL"); @@ -318,11 +309,9 @@ AdLibSoundDriver::AdLibSoundDriver(Audio::Mixer *mixer) _sfxVolume = ConfMan.getBool("sfx_mute") ? 0 : MIN(255, ConfMan.getInt("sfx_volume")); _opl->start(new Common::Functor0Mem<void, AdLibSoundDriver>(this, &AdLibSoundDriver::onTimer), 50); - _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } AdLibSoundDriver::~AdLibSoundDriver() { - _mixer->stopHandle(_soundHandle); delete _opl; } @@ -390,10 +379,6 @@ void AdLibSoundDriver::stopAll() { _opl->writeReg(0xBD, 0); } -int AdLibSoundDriver::readBuffer(int16 *buffer, const int numSamples) { - return _opl->readBuffer(buffer, numSamples); -} - void AdLibSoundDriver::initCard() { _vibrato = 0x20; _opl->writeReg(0xBD, _vibrato); |
