22 #ifndef SCUMM_PLAYERS_PLAYER_SID_H 23 #define SCUMM_PLAYERS_PLAYER_SID_H 25 #include "common/mutex.h" 26 #include "common/scummsys.h" 27 #include "scumm/music.h" 28 #include "audio/audiostream.h" 29 #include "audio/mixer.h" 30 #include "audio/softsynth/sid.h" 66 int readBuffer(int16 *buffer,
const int numSamples)
override;
67 bool isStereo()
const override {
return false; }
69 int getRate()
const override {
return _sampleRate; }
73 void SID_Write(
int reg, uint8 data);
75 uint8 *getResource(
int resID);
78 Resid::cycle_count _cpuCyclesLeft;
87 VideoStandard _videoSystem;
93 void initMusic(
int songResIndex);
94 int initSound(
int soundResID);
95 void stopSound_intern(
int soundResID);
96 void stopMusic_intern();
100 void handleMusicBuffer();
101 int setupSongFileData();
102 void func_3674(
int channel);
103 void resetPlayerState();
104 void processSongData(
int channel);
105 void readSetSIDFilterAndProps(
int *offset, uint8* dataPtr);
106 void saveSongPos(
int y,
int channel);
107 void updateFreq(
int channel);
108 void resetFreqDelta(
int channel);
109 void readSongChunk(
int channel);
110 void setSIDFreqAS(
int channel);
111 void setSIDWaveCtrlReg(
int channel);
112 int setupSongPtr(
int channel);
113 void unlockResource(
int chanResIndex);
114 void countFreeChannels();
115 void func_4F45(
int channel);
116 void safeUnlockResource(
int resIndex);
117 void releaseResource(
int resIndex);
118 void releaseResChannels(
int resIndex);
119 void releaseResourceUnk(
int resIndex);
120 void releaseChannel(
int channel);
121 void clearSIDWaveform(
int channel);
122 void stopChannel(
int channel);
123 void swapVars(
int channel,
int swapIndex);
124 void resetSwapVars();
125 void prepareSwapVars(
int channel);
126 void useSwapVars(
int channel);
127 void lockResource(
int resIndex);
128 void reserveChannel(
int channel, uint8 prioValue,
int chanResIndex);
129 void unlockCodeLocation();
130 void lockCodeLocation();
131 void func_7eae(
int channel, uint8* songFileDataPtr);
132 void func_819b(
int channel);
133 void buildStepTbl(
int step);
134 int reserveSoundFilter(uint8 value, uint8 chanResIndex);
135 int reserveSoundVoice(uint8 value, uint8 chanResIndex);
136 void findLessPrioChannels(uint8 soundPrio);
137 void releaseResourceBySound(
int resID);
138 void readVec6Data(
int x,
int *offset, uint8 *songFilePtr,
int chanResID);
142 uint8 chanBuffer[3][45];
150 uint8 busyChannelBits;
156 uint8* chanFileData[3];
157 uint16 chanDataOffset[3];
158 uint8* songPosPtr[7];
171 uint16 songFileOrChanBufOffset[7];
174 int freqDeltaCounter[7];
175 uint8* swapSongPosPtr[3];
179 uint16 swapFreqReg[3];
198 uint8* songFileOrChanBufData;
199 uint8* actSongFileData;
213 uint8 freeChannelCount;
217 uint8 usedChannelBits;
226 uint8 songChannelBits;
228 bool pulseWidthSwapped;
235 uint8 SIDReg24_HiNibble;
239 bool releasePhase[3];
249 uint8 songPosUpdateCounter[7];
257 uint8 waveCtrlReg[7];
260 uint8 swapSustain[2];
261 uint8 swapSongPrio[3];
264 uint8 swapSongPosUpdateCounter[3];
265 uint8 swapWaveCtrlReg[3];
267 bool actFilterHasLowerPrio;
268 uint8 chansWithLowerPrioCount;
270 uint8 minChanPrioIndex;
int readBuffer(int16 *buffer, const int numSamples) override
void setMusicVolume(int vol) override
Definition: player_sid.h:58
int getRate() const override
Definition: player_sid.h:69
bool endOfData() const override
Definition: player_sid.h:68
Definition: player_sid.h:53
int getMusicTimer() override
Definition: audiostream.h:50
bool isStereo() const override
Definition: player_sid.h:67
void stopSound(int sound) override
void startSound(int sound) override
int getSoundStatus(int sound) const override
void stopAllSounds() override