22 #ifndef MM_SHARED_XEEN_SOUND_DRIVER_ADLIB_H 23 #define MM_SHARED_XEEN_SOUND_DRIVER_ADLIB_H 25 #include "audio/mididrv.h" 26 #include "mm/shared/xeen/sound_driver.h" 37 struct RegisterValue {
41 RegisterValue(
int regNum,
int value) {
42 _regNum = regNum; _value = value;
46 static const byte OPERATOR1_INDEXES[CHANNEL_COUNT];
47 static const byte OPERATOR2_INDEXES[CHANNEL_COUNT];
48 static const uint WAVEFORMS[24];
53 const byte *_musInstrumentPtrs[16];
54 const byte *_fxInstrumentPtrs[16];
58 int _musicVolume, _sfxVolume;
69 void write(
int reg,
int val);
84 void resetFrequencies();
89 void setFrequency(byte operatorNum, uint frequency);
94 uint calcFrequency(byte note);
99 void setOutputLevel(byte channelNum, uint level);
104 void playInstrument(byte channelNum,
const byte *data,
bool isFx);
109 byte calculateLevel(byte level,
bool isFx);
112 bool musSetInstrument(
const byte *&srcP, byte param)
override;
113 bool musSetPitchWheel(
const byte *&srcP, byte param)
override;
114 bool musSetPanning(
const byte *&srcP, byte param)
override;
115 bool musFade(
const byte *&srcP, byte param)
override;
116 bool musStartNote(
const byte *&srcP, byte param)
override;
117 bool musSetVolume(
const byte *&srcP, byte param)
override;
118 bool musInjectMidi(
const byte *&srcP, byte param)
override;
119 bool musPlayInstrument(
const byte *&srcP, byte param)
override;
120 bool cmdFreezeFrequency(
const byte *&srcP, byte param)
override;
121 bool cmdChangeFrequency(
const byte *&srcP, byte param)
override;
123 bool fxSetInstrument(
const byte *&srcP, byte param)
override;
124 bool fxSetVolume(
const byte *&srcP, byte param)
override;
125 bool fxMidiReset(
const byte *&srcP, byte param)
override;
126 bool fxMidiDword(
const byte *&srcP, byte param)
override;
127 bool fxSetPanning(
const byte *&srcP, byte param)
override;
128 bool fxChannelOff(
const byte *&srcP, byte param)
override;
129 bool fxFade(
const byte *&srcP, byte param)
override;
130 bool fxStartNote(
const byte *&srcP, byte param)
override;
131 bool fxInjectMidi(
const byte *&srcP, byte param)
override;
132 bool fxPlayInstrument(
const byte *&srcP, byte param)
override;
137 void pausePostProcess()
override;
142 void resetFX()
override;
147 void sysExMessage(
const byte *&data)
override;
162 void playFX(uint effectId,
const byte *data)
override;
167 void playSong(
const byte *data)
override;
172 int songCommand(uint commandId, byte musicVolume = 0, byte sfxVolume = 0)
override;
Definition: detection.h:27
Definition: sound_driver_adlib.h:36
Definition: sound_driver.h:56