aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular
diff options
context:
space:
mode:
authorMatthew Hoops2015-04-30 00:01:30 -0400
committerMatthew Hoops2015-07-07 20:19:47 -0400
commitbed9da8b9dbbaa19d317f71663e42875c1717fda (patch)
tree56b714515cae107ae1f7992a2e85db1e9c800a8a /engines/mads/nebular
parent8bcbcd6c167e8e7169f006da459f3cbe450a4a59 (diff)
downloadscummvm-rg350-bed9da8b9dbbaa19d317f71663e42875c1717fda.tar.gz
scummvm-rg350-bed9da8b9dbbaa19d317f71663e42875c1717fda.tar.bz2
scummvm-rg350-bed9da8b9dbbaa19d317f71663e42875c1717fda.zip
AUDIO: Remove all AudioStream access to OPL
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r--engines/mads/nebular/sound_nebular.cpp12
-rw-r--r--engines/mads/nebular/sound_nebular.h24
2 files changed, 1 insertions, 35 deletions
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<void, ASound>(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<CachedDataEntry>::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<CachedDataEntry> _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
*/