22 #ifndef SCUMM_PLAYERS_PLAYER_TOWNS_H 23 #define SCUMM_PLAYERS_PLAYER_TOWNS_H 25 #include "scumm/scumm.h" 26 #include "scumm/imuse/imuse.h" 27 #include "scumm/imuse/drivers/fmtowns.h" 28 #include "audio/softsynth/fmtowns_pc98/towns_euphony.h" 37 virtual bool init() = 0;
43 virtual int32 doCommand(
int numargs,
int args[]) = 0;
49 virtual int getCurrentCdaSound() {
return 0; }
50 virtual int getCurrentCdaVolume() {
return 0; }
51 virtual void setVolumeCD(
int left,
int right) {}
52 virtual void setSoundVolume(
int sound,
int left,
int right) {}
53 virtual void setSoundNote(
int sound,
int note) {}
56 void playPcmTrack(
int sound,
const uint8 *data,
int velo = 0,
int pan = 64,
int note = 0,
int priority = 0);
57 void stopPcmTrack(
int sound);
59 int allocatePcmChannel(
int sound,
int sfxChanRelIndex, uint32 priority);
70 } _pcmCurrentSound[9];
73 uint8 _unkFlags = 0x33;
78 const int _numSoundMax;
95 int getCurrentCdaSound()
override {
return _cdaCurrentSound; }
96 int getCurrentCdaVolume()
override {
return (_cdaVolLeft + _cdaVolRight + 1) >> 1; }
98 int32 doCommand(
int numargs,
int args[])
override;
100 void setVolumeCD(
int left,
int right)
override;
101 void setSoundVolume(
int sound,
int left,
int right)
override;
102 void setSoundNote(
int sound,
int note)
override;
108 void restartLoopingSounds();
109 void startSoundEx(
int sound,
int velo,
int pan,
int note);
110 void stopSoundSuspendLooping(
int sound);
112 void playEuphonyTrack(
int sound,
const uint8 *data);
113 void playCdaTrack(
int sound,
const uint8 *data,
bool skipTrackVelo =
false);
115 struct SoundOvrParameters {
121 SoundOvrParameters *_soundOverride =
nullptr;
123 uint8 _cdaVolLeft = 0;
124 uint8 _cdaVolRight = 0;
126 uint8 _eupCurrentSound = 0;
127 uint8 _eupLooping = 0;
128 uint8 _eupVolLeft = 0;
129 uint8 _eupVolRight = 0;
131 uint8 _cdaCurrentSound = 0;
132 uint8 _cdaNumLoops = 0;
133 uint8 _cdaForceRestart = 0;
135 uint8 _cdaCurrentSoundTemp = 0;
136 uint8 _cdaNumLoopsTemp = 0;
146 bool init()
override;
155 int32 doCommand(
int numargs,
int args[])
override;
160 void playVocTrack(
const uint8 *data);
162 struct SoundOvrParameters {
168 SoundOvrParameters *_soundOverride =
nullptr;
170 uint8 *_sblData =
nullptr;
172 IMuse *_imuse =
nullptr;
173 const bool _imuseDispose;
Definition: player_towns.h:141
virtual void stopAllSounds()=0
virtual void startSound(int sound)=0
void setSfxVolume(int vol) override
Definition: player_towns.h:61
void restoreAfterLoad() override
Definition: serializer.h:79
Definition: towns_audio.h:37
virtual void setMusicVolume(int vol)=0
int getSoundStatus(int sound) const override
Definition: player_towns.h:32
Definition: towns_euphony.h:115
Definition: player_towns.h:82
void saveLoadWithSerializer(Common::Serializer &ser) override
virtual void stopSound(int sound)=0