22 #ifndef MADS_SOUND_NEBULAR_H 23 #define MADS_SOUND_NEBULAR_H 25 #include "common/scummsys.h" 26 #include "common/file.h" 27 #include "common/mutex.h" 28 #include "common/queue.h" 35 class SeekableReadStream;
85 static bool _channelsEnabled;
90 void enable(
int flag);
91 void setPtr2(byte *pData);
92 void load(byte *pData);
93 void check(byte *nullPtr);
134 _regNum = regNum; _value = value;
138 #define ADLIB_CHANNEL_COUNT 9 139 #define ADLIB_CHANNEL_MIDWAY 5 140 #define CALLBACKS_PER_SECOND 60 175 void checkChannels();
180 void pollActiveChannel();
187 void updateChannelState();
188 void updateActiveChannel();
193 void loadSample(
int sampleIndex);
198 void processSample();
200 void updateFNumber();
212 void write(
int reg,
int val);
217 int write2(
int state,
int reg,
int val);
227 void channelOn(
int reg,
int volume);
232 void channelOff(
int reg);
243 byte *loadData(
int offset,
int size);
250 void playSound(
int offset,
int size);
257 void playSoundData(byte *pData,
int startingChannel = ADLIB_CHANNEL_MIDWAY);
262 bool isSoundActive(byte *pData);
267 void setFrequency(
int channel,
int freq);
272 int getRandomNumber();
274 virtual int command0();
284 int nullCommand() {
return 0; }
301 int _activeChannelNumber;
306 int _channelNum1, _channelNum2;
316 int _activeChannelReg;
318 bool _amDep, _vibDep, _splitPoint;
337 static void validate();
345 virtual int command(
int commandId,
int param) = 0;
375 void setVolume(
int volume);
380 typedef int (
ASound1::*CommandPtr)();
381 static const CommandPtr _commandList[42];
418 void command111213();
419 int command2627293032();
423 int command(
int commandId,
int param)
override;
428 byte _command12Param;
430 typedef int (
ASound2::*CommandPtr)();
431 static const CommandPtr _commandList[44];
433 int command0()
override;
470 void command9Randomize();
471 void command9Apply(byte *data,
int val,
int incr);
475 int command(
int commandId,
int param)
override;
482 typedef int (
ASound3::*CommandPtr)();
483 static const CommandPtr _commandList[61];
530 void command9Randomize();
531 void command9Apply(byte *data,
int val,
int incr);
535 int command(
int commandId,
int param)
override;
540 typedef int (
ASound4::*CommandPtr)();
541 static const CommandPtr _commandList[61];
573 int command(
int commandId,
int param)
override;
578 typedef int (
ASound5::*CommandPtr)();
579 static const CommandPtr _commandList[42];
619 int command(
int commandId,
int param)
override;
624 typedef int (
ASound6::*CommandPtr)();
625 static const CommandPtr _commandList[30];
648 int command(
int commandId,
int param)
override;
653 typedef int (
ASound7::*CommandPtr)();
654 static const CommandPtr _commandList[38];
680 int command(
int commandId,
int param)
override;
685 typedef int (
ASound8::*CommandPtr)();
686 static const CommandPtr _commandList[38];
718 void method1(byte *pData);
719 void adjustRange(byte *pData, byte v,
int incr);
723 int command(
int commandId,
int param)
override;
731 typedef int (
ASound9::*CommandPtr)();
732 static const CommandPtr _commandList[52];
782 int command(
int commandId,
int param)
override;
Definition: sound_nebular.h:378
Definition: sound_nebular.h:478
Definition: sound_nebular.h:426
Definition: sound_nebular.h:129
Definition: sound_nebular.h:142
Definition: sound_nebular.h:651
Definition: sound_nebular.h:538
Definition: algorithm.h:29
Definition: sound_nebular.h:683
Definition: sound_nebular.h:576
Definition: sound_nebular.h:104
Definition: sound_nebular.h:96
Definition: sound_nebular.h:51
Definition: sound_nebular.h:726
Definition: sound_nebular.h:151
Definition: sound_nebular.h:622
int getFrameCounter()
Definition: sound_nebular.h:365