22 #ifndef SCUMM_PLAYERS_PLAYER_MAC_INTERN_H 23 #define SCUMM_PLAYERS_PLAYER_MAC_INTERN_H 25 #include "engines/scumm/players/mac_sound_lowlevel.h" 26 #include "common/serializer.h" 30 class LegacyMusicDriver;
38 bool startDevices(uint32 outputRate, uint32 pcmDeviceRate, uint32 feedBufferSize,
bool enableInterpolation,
bool stereo,
bool internal16Bit);
40 void setMusicVolume(
int vol);
41 void setSfxVolume(
int vol);
42 void startSound(
int id);
43 void stopSound(
int id);
46 int getSoundStatus(
int id)
const;
47 void setQuality(
int qual);
49 void restoreAfterLoad();
50 void toggleMusic(
bool enable);
51 void toggleSoundEffects(
bool enable);
53 void vblCallback()
override;
58 void startSong(
int id);
59 void startSoundEffect(
int id);
61 void stopSoundEffect();
62 void stopActiveSound();
65 void updateSoundEffect();
67 void checkRestartSoundEffects();
70 bool isSong(
int id)
const;
71 bool isHiQuality()
const;
75 int _lastSoundEffectPrio;
76 int _soundEffectNumLoops;
79 uint _activeChanCount;
80 byte _songTimerInternal;
84 bool _soundEffectPlaying;
85 bool _soundEffectReschedule;
92 MacLowLevelPCMDriver::ChanHandle _sfxChan;
102 const byte *_musicIDTable;
103 int _musicIDTableLen;
104 const int _idRangeMax;
106 LegacyMusicDriver *_mdrv;
119 void parseNextEvents();
120 void noteOn(uint16 duration, uint8 note);
121 uint16 checkPeriod()
const;
140 uint16 _modSensitivity;
142 uint16 _localVars[5];
147 typedef bool (Indy3MacSnd::MusicChannel::*CtrlProc)(
const byte *&);
149 bool ctrl_setShape(
const byte *&pos);
150 bool ctrl_modPara(
const byte *&pos);
151 bool ctrl_init(
const byte *&pos);
152 bool ctrl_returnFromSubroutine(
const byte *&pos);
153 bool ctrl_jumpToSubroutine(
const byte *&pos);
154 bool ctrl_initOther(
const byte *&pos);
155 bool ctrl_decrJumpIf(
const byte *&pos);
156 bool ctrl_writeVar(
const byte *&pos);
158 const CtrlProc *_ctrlProc;
161 uint16 &getMemberRef(
int pos);
165 uint16 &_savedOffset;
170 static MusicChannel *_ctrlChan;
172 static const uint32 _envShapes[98];
173 const uint8 *
const &_modShapes;
174 const uint32 &_modShapesTableSize;
176 bool ctrlProc(
int procId,
const byte *&arg);
177 void setFrameLen(uint8 len);
180 MusicChannel **_musicChannels;
181 const int _numMusicChannels;
182 const int _numMusicTracks;
185 MusicChannel *getMusicChannel(uint8
id)
const;
195 bool startDevice(uint32 outputRate, uint32 pcmDeviceRate, uint32 feedBufferSize,
bool enableInterpolation,
bool stereo,
bool internal16Bit);
197 void setMusicVolume(
int vol);
198 void setSfxVolume(
int vol);
199 void startSound(
int id,
int jumpToTick = 0);
200 void stopSound(
int id);
201 void stopAllSounds();
203 int getSoundStatus(
int id)
const;
204 void setQuality(
int qual);
206 void restoreAfterLoad();
207 void toggleMusic(
bool enable);
208 void toggleSoundEffects(
bool enable);
210 void vblCallback()
override;
214 void sndChannelCallback(uint16 arg1,
const void *arg2)
override;
217 void sendSoundCommands(
int timeStamp);
218 void stopActiveSound();
219 void setupChannels();
220 void disposeAllChannels();
221 void updateDisabledState();
223 void detectQuality();
224 bool isSoundCardType10()
const;
228 int _curSoundSaveVar;
231 byte _songTimerInternal;
232 byte *_chanConfigTable;
233 const int _idRangeMax;
234 const byte _saveVersionChange;
235 const byte _legacySaveUnits;
239 int _selectedQuality;
240 int _effectiveChanConfig;
241 int _defaultChanConfig;
245 MacLowLevelPCMDriver::ChanHandle _sndChannel;
246 MacLowLevelPCMDriver::ChanHandle _musChannels[4];
249 MacSndLoader *_loader;
Definition: mac_sound_lowlevel.h:77
Definition: player_mac_intern.h:32
Definition: mac_sound_lowlevel.h:130
Definition: mac_sound_lowlevel.h:46
Definition: mac_sound_lowlevel.h:175
Definition: serializer.h:79
SoundType
Definition: mixer.h:62
Definition: mac_sound_lowlevel.h:183
Definition: mac_sound_lowlevel.h:75
Definition: player_mac_intern.h:189