22 #ifndef TOWNS_PC98_AUDIODRIVER_H 23 #define TOWNS_PC98_AUDIODRIVER_H 25 #include "audio/softsynth/fmtowns_pc98/pc98_audio.h" 27 class TownsPC98_MusicChannel;
28 class TownsPC98_MusicChannelSSG;
29 class TownsPC98_SfxChannel;
30 #ifndef DISABLE_PC98_RHYTHM_CHANNEL 31 class TownsPC98_MusicChannelPCM;
35 friend class TownsPC98_MusicChannel;
36 friend class TownsPC98_MusicChannelSSG;
37 friend class TownsPC98_SfxChannel;
38 #ifndef DISABLE_PC98_RHYTHM_CHANNEL 39 friend class TownsPC98_MusicChannelPCM;
45 void loadMusicData(uint8 *data,
bool loadPaused =
false);
46 void loadSoundEffectData(uint8 *data, uint8 trackNum);
56 bool musicPlaying()
const;
58 void setMusicVolume(
int volume);
59 void setSoundEffectVolume(
int volume);
62 uint8 readReg(uint8 part, uint8 reg);
63 void writeReg(uint8 part, uint8 reg, uint8 val);
64 void preventRegisterWrite(
bool prevent);
66 void timerCallbackA();
67 void timerCallbackB();
69 void startSoundEffect();
71 void setMusicTempo(uint8 tempo);
72 void setSfxTempo(uint16 tempo);
74 TownsPC98_MusicChannel **_channels;
75 TownsPC98_MusicChannelSSG **_ssgChannels;
76 TownsPC98_SfxChannel **_sfxChannels;
77 #ifndef DISABLE_PC98_RHYTHM_CHANNEL 78 TownsPC98_MusicChannelPCM *_rhythmChannel;
83 const uint8 *_patchData;
85 uint8 _updateChannelsFlag;
87 uint8 _updateRhythmFlag;
89 uint8 _finishedChannelsFlag;
90 uint8 _finishedSSGFlag;
91 uint8 _finishedRhythmFlag;
92 uint8 _finishedSfxFlag;
98 uint32 _musicTickCounter;
102 uint16 _sfxOffsets[2];
105 bool _regWriteProtect;
109 const int _numChanFM;
110 const int _numChanSSG;
111 const int _numChanRHY;
113 static const uint8 _channelPreset[36];
114 static const uint8 _levelPresetFMTOWNS[24];
115 static const uint8 _levelPresetPC98[24];
116 const uint8 *_levelPresets;
Definition: pc98_audio.h:45
Definition: pc98_audio.h:32
Definition: towns_pc98_driver.h:34