25 #include "common/array.h" 26 #include "common/file.h" 27 #include "common/mutex.h" 28 #include "common/queue.h" 48 bool _pollSoundEnabled =
false;
49 bool _soundPollFlag =
false;
50 bool _newSoundsPaused =
false;
52 int _masterVolume = 255;
59 virtual void loadDriver(
int sectionNum) = 0;
65 virtual void validate() = 0;
72 void init(
int sectionNumber);
88 void setEnabled(
bool flag);
93 void pauseNewCommands();
98 void startQueuedCommands();
103 void setVolume(
int volume);
111 int command(
int commandId,
int param = 0);
172 static bool _channelsEnabled;
177 void enable(
int flag);
178 void setPtr2(byte *pData);
179 void load(byte *pData);
180 void check(byte *nullPtr);
222 _regNum = regNum; _value = value;
226 #define ADLIB_CHANNEL_COUNT 9 227 #define ADLIB_CHANNEL_MIDWAY 5 228 #define CALLBACKS_PER_SECOND 60 263 void checkChannels();
268 void pollActiveChannel();
275 void updateChannelState();
276 void updateActiveChannel();
281 void processSample();
283 void updateFNumber();
291 int _chanCommandCount;
294 virtual void channelCommand(byte *&pSrc,
bool &updateFlag) = 0;
299 void loadSample(
int sampleIndex);
304 void write(
int reg,
int val);
309 int write2(
int state,
int reg,
int val);
319 void channelOn(
int reg,
int volume);
324 void channelOff(
int reg);
335 byte *loadData(
int offset,
int size);
342 void playSound(
int offset,
int size);
349 void playSoundData(byte *pData,
int startingChannel = ADLIB_CHANNEL_MIDWAY);
354 bool isSoundActive(byte *pData);
359 void setFrequency(
int channel,
int freq);
364 int getRandomNumber();
370 byte *getDataPtr(
int nearPtr);
372 virtual int command0();
401 int _activeChannelNumber;
406 int _channelNum1, _channelNum2;
416 int _activeChannelReg;
418 bool _amDep, _vibDep, _splitPoint;
437 static void validate();
445 virtual int command(
int commandId,
int param) = 0;
466 return _frameCounter;
477 void setVolume(
int volume);
int getFrameCounter()
Definition: sound.h:465