diff options
author | Willem Jan Palenstijn | 2015-07-22 22:37:40 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-07-22 22:43:42 +0200 |
commit | 6ec9c81b575f13b2c4b30aeac592ebf2557b5890 (patch) | |
tree | 503d50902bad2d800165593039d08d5ccf0c98ab /engines/tsage/sound.h | |
parent | 5ec05f6b647c5ea41418be7ed19ad381f97cabd8 (diff) | |
parent | 4e5c8d35f7e133e2e72a846fdbd54900c91eeb73 (diff) | |
download | scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.gz scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.bz2 scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.zip |
Merge branch 'master' into mm
Conflicts:
engines/access/access.cpp
engines/access/asurface.h
engines/access/bubble_box.cpp
engines/access/bubble_box.h
engines/access/martian/martian_game.cpp
engines/access/player.cpp
engines/access/player.h
engines/access/resources.cpp
engines/access/screen.cpp
engines/access/screen.h
engines/access/sound.cpp
engines/access/sound.h
Diffstat (limited to 'engines/tsage/sound.h')
-rw-r--r-- | engines/tsage/sound.h | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h index 49558b4bca..68755a48c8 100644 --- a/engines/tsage/sound.h +++ b/engines/tsage/sound.h @@ -27,12 +27,15 @@ #include "common/mutex.h" #include "common/queue.h" #include "audio/audiostream.h" -#include "audio/fmopl.h" #include "audio/mixer.h" #include "common/list.h" #include "tsage/saveload.h" #include "tsage/core.h" +namespace OPL { +class OPL; +} + namespace TsAGE { class Sound; @@ -446,21 +449,15 @@ public: #define ADLIB_CHANNEL_COUNT 9 -class AdlibSoundDriver: public SoundDriver, Audio::AudioStream { +class AdlibSoundDriver: public SoundDriver { private: GroupData _groupData; Audio::Mixer *_mixer; - FM_OPL *_opl; - Audio::SoundHandle _soundHandle; - int _sampleRate; + OPL::OPL *_opl; byte _portContents[256]; const byte *_patchData; int _masterVolume; Common::Queue<RegisterValue> _queue; - int _samplesTillCallback; - int _samplesTillCallbackRemainder; - int _samplesPerCallback; - int _samplesPerCallbackRemainder; bool _channelVoiced[ADLIB_CHANNEL_COUNT]; int _channelVolume[ADLIB_CHANNEL_COUNT]; @@ -495,13 +492,8 @@ public: virtual void proc38(int channel, int cmd, int value); virtual void setPitch(int channel, int pitchBlend); - // 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 update(int16 *buf, int len); +private: + void onTimer(); }; class SoundBlasterDriver: public SoundDriver { |