diff options
author | Matthew Hoops | 2015-04-03 00:18:58 -0400 |
---|---|---|
committer | Matthew Hoops | 2015-07-07 20:19:42 -0400 |
commit | f1f29302f5401c4782985cec4d47d069b99036ee (patch) | |
tree | 60c6c8c7b2867cf9524197d2c2c0734746906b71 /engines/mads/nebular | |
parent | 2fa1ce51dd3cb00eef289094fe9f660c237254bc (diff) | |
download | scummvm-rg350-f1f29302f5401c4782985cec4d47d069b99036ee.tar.gz scummvm-rg350-f1f29302f5401c4782985cec4d47d069b99036ee.tar.bz2 scummvm-rg350-f1f29302f5401c4782985cec4d47d069b99036ee.zip |
AUDIO: Remove the legacy OPL API
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r-- | engines/mads/nebular/sound_nebular.cpp | 21 | ||||
-rw-r--r-- | engines/mads/nebular/sound_nebular.h | 27 |
2 files changed, 26 insertions, 22 deletions
diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp index 240c18f6dc..b0a0938958 100644 --- a/engines/mads/nebular/sound_nebular.cpp +++ b/engines/mads/nebular/sound_nebular.cpp @@ -21,6 +21,7 @@ */ #include "audio/audiostream.h" +#include "audio/fmopl.h" #include "audio/decoders/raw.h" #include "common/algorithm.h" #include "common/debug.h" @@ -156,7 +157,7 @@ AdlibSample::AdlibSample(Common::SeekableReadStream &s) { /*-----------------------------------------------------------------------*/ -ASound::ASound(Audio::Mixer *mixer, FM_OPL *opl, const Common::String &filename, int dataOffset) { +ASound::ASound(Audio::Mixer *mixer, OPL::OPL *opl, const Common::String &filename, int dataOffset) { // Open up the appropriate sound file if (!_soundFile.open(filename)) error("Could not open file - %s", filename.c_str()); @@ -984,7 +985,7 @@ const ASound1::CommandPtr ASound1::_commandList[42] = { &ASound1::command40, &ASound1::command41 }; -ASound1::ASound1(Audio::Mixer *mixer, FM_OPL *opl) +ASound1::ASound1(Audio::Mixer *mixer, OPL::OPL *opl) : ASound(mixer, opl, "asound.001", 0x1520) { _cmd23Toggle = false; @@ -1285,7 +1286,7 @@ const ASound2::CommandPtr ASound2::_commandList[44] = { &ASound2::command40, &ASound2::command41, &ASound2::command42, &ASound2::command43 }; -ASound2::ASound2(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.002", 0x15E0) { +ASound2::ASound2(Audio::Mixer *mixer, OPL::OPL *opl) : ASound(mixer, opl, "asound.002", 0x15E0) { _command12Param = 0xFD; // Load sound samples @@ -1656,7 +1657,7 @@ const ASound3::CommandPtr ASound3::_commandList[61] = { &ASound3::command60 }; -ASound3::ASound3(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.003", 0x15B0) { +ASound3::ASound3(Audio::Mixer *mixer, OPL::OPL *opl) : ASound(mixer, opl, "asound.003", 0x15B0) { _command39Flag = false; // Load sound samples @@ -2060,7 +2061,7 @@ const ASound4::CommandPtr ASound4::_commandList[61] = { &ASound4::command60 }; -ASound4::ASound4(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.004", 0x14F0) { +ASound4::ASound4(Audio::Mixer *mixer, OPL::OPL *opl) : ASound(mixer, opl, "asound.004", 0x14F0) { // Load sound samples _soundFile.seek(_dataOffset + 0x122); for (int i = 0; i < 210; ++i) @@ -2316,7 +2317,7 @@ const ASound5::CommandPtr ASound5::_commandList[42] = { &ASound5::command40, &ASound5::command41 }; -ASound5::ASound5(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.002", 0x15E0) { +ASound5::ASound5(Audio::Mixer *mixer, OPL::OPL *opl) : ASound(mixer, opl, "asound.002", 0x15E0) { // Load sound samples _soundFile.seek(_dataOffset + 0x144); for (int i = 0; i < 164; ++i) @@ -2557,7 +2558,7 @@ const ASound6::CommandPtr ASound6::_commandList[30] = { &ASound6::nullCommand, &ASound6::command29 }; -ASound6::ASound6(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.006", 0x1390) { +ASound6::ASound6(Audio::Mixer *mixer, OPL::OPL *opl) : ASound(mixer, opl, "asound.006", 0x1390) { // Load sound samples _soundFile.seek(_dataOffset + 0x122); for (int i = 0; i < 200; ++i) @@ -2713,7 +2714,7 @@ const ASound7::CommandPtr ASound7::_commandList[38] = { &ASound7::command36, &ASound7::command37 }; -ASound7::ASound7(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.007", 0x1460) { +ASound7::ASound7(Audio::Mixer *mixer, OPL::OPL *opl) : ASound(mixer, opl, "asound.007", 0x1460) { // Load sound samples _soundFile.seek(_dataOffset + 0x122); for (int i = 0; i < 214; ++i) @@ -2919,7 +2920,7 @@ const ASound8::CommandPtr ASound8::_commandList[38] = { &ASound8::command36, &ASound8::command37 }; -ASound8::ASound8(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.008", 0x1490) { +ASound8::ASound8(Audio::Mixer *mixer, OPL::OPL *opl) : ASound(mixer, opl, "asound.008", 0x1490) { // Load sound samples _soundFile.seek(_dataOffset + 0x122); for (int i = 0; i < 174; ++i) @@ -3175,7 +3176,7 @@ const ASound9::CommandPtr ASound9::_commandList[52] = { &ASound9::command48, &ASound9::command49, &ASound9::command50, &ASound9::command51 }; -ASound9::ASound9(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.009", 0x16F0) { +ASound9::ASound9(Audio::Mixer *mixer, OPL::OPL *opl) : ASound(mixer, opl, "asound.009", 0x16F0) { _v1 = _v2 = 0; _soundPtr = nullptr; diff --git a/engines/mads/nebular/sound_nebular.h b/engines/mads/nebular/sound_nebular.h index 9bc1a49458..e0956327b4 100644 --- a/engines/mads/nebular/sound_nebular.h +++ b/engines/mads/nebular/sound_nebular.h @@ -28,9 +28,12 @@ #include "common/mutex.h" #include "common/queue.h" #include "audio/audiostream.h" -#include "audio/fmopl.h" #include "audio/mixer.h" +namespace OPL { +class OPL; +} + namespace MADS { class SoundManager; @@ -273,7 +276,7 @@ protected: int nullCommand() { return 0; } public: Audio::Mixer *_mixer; - FM_OPL *_opl; + OPL::OPL *_opl; Audio::SoundHandle _soundHandle; AdlibChannel _channels[ADLIB_CHANNEL_COUNT]; AdlibChannel *_activeChannelPtr; @@ -318,7 +321,7 @@ public: * @param filename Specifies the adlib sound player file to use * @param dataOffset Offset in the file of the data segment */ - ASound(Audio::Mixer *mixer, FM_OPL *opl, const Common::String &filename, int dataOffset); + ASound(Audio::Mixer *mixer, OPL::OPL *opl, const Common::String &filename, int dataOffset); /** * Destructor @@ -433,7 +436,7 @@ private: void command111213(); int command2627293032(); public: - ASound1(Audio::Mixer *mixer, FM_OPL *opl); + ASound1(Audio::Mixer *mixer, OPL::OPL *opl); virtual int command(int commandId, int param); }; @@ -485,7 +488,7 @@ private: void command9Randomize(); void command9Apply(byte *data, int val, int incr); public: - ASound2(Audio::Mixer *mixer, FM_OPL *opl); + ASound2(Audio::Mixer *mixer, OPL::OPL *opl); virtual int command(int commandId, int param); }; @@ -545,7 +548,7 @@ private: void command9Randomize(); void command9Apply(byte *data, int val, int incr); public: - ASound3(Audio::Mixer *mixer, FM_OPL *opl); + ASound3(Audio::Mixer *mixer, OPL::OPL *opl); virtual int command(int commandId, int param); }; @@ -583,7 +586,7 @@ private: void method1(); public: - ASound4(Audio::Mixer *mixer, FM_OPL *opl); + ASound4(Audio::Mixer *mixer, OPL::OPL *opl); virtual int command(int commandId, int param); }; @@ -629,7 +632,7 @@ private: int command42(); int command43(); public: - ASound5(Audio::Mixer *mixer, FM_OPL *opl); + ASound5(Audio::Mixer *mixer, OPL::OPL *opl); virtual int command(int commandId, int param); }; @@ -658,7 +661,7 @@ private: int command25(); int command29(); public: - ASound6(Audio::Mixer *mixer, FM_OPL *opl); + ASound6(Audio::Mixer *mixer, OPL::OPL *opl); virtual int command(int commandId, int param); }; @@ -690,7 +693,7 @@ private: int command36(); int command37(); public: - ASound7(Audio::Mixer *mixer, FM_OPL *opl); + ASound7(Audio::Mixer *mixer, OPL::OPL *opl); virtual int command(int commandId, int param); }; @@ -733,7 +736,7 @@ private: void method1(byte *pData); void adjustRange(byte *pData, byte v, int incr); public: - ASound8(Audio::Mixer *mixer, FM_OPL *opl); + ASound8(Audio::Mixer *mixer, OPL::OPL *opl); virtual int command(int commandId, int param); }; @@ -792,7 +795,7 @@ private: int command59(); int command60(); public: - ASound9(Audio::Mixer *mixer, FM_OPL *opl); + ASound9(Audio::Mixer *mixer, OPL::OPL *opl); virtual int command(int commandId, int param); }; |