25 #include "audio/mixer.h" 26 #include "chewy/atds.h" 27 #include "chewy/chewy.h" 33 #define MAX_SOUND_EFFECTS 14 37 static const int TMF_NUM_INSTRUMENTS = 31;
38 static const uint8 TMF_MOD_SONG_NAME[20];
39 static const uint8 TMF_MOD_INSTRUMENT_NAME[22];
40 static const uint16 TMF_MOD_PERIODS[36];
46 void playSound(
int num, uint channel = 0, uint16 loops = 1, uint16 volume = 63, uint16 balance = 63);
47 void playSound(uint8 *data, uint32 size, uint channel = 0, uint16 loops = 1, uint16 volume = 63, uint16 balance = 63, DisposeAfterUse::Flag dispose = DisposeAfterUse::YES);
48 void pauseSound(uint channel);
49 void resumeSound(uint channel);
50 void stopSound(uint channel = 0);
52 bool isSoundActive(uint channel)
const;
53 void setUserSoundVolume(uint volume);
54 int getUserSoundVolume()
const;
57 void setSoundChannelVolume(uint channel, uint volume);
60 void setSoundChannelBalance(uint channel, int8 balance);
62 void playMusic(int16 num,
bool loop =
false);
63 void playMusic(uint8 *data, uint32 size, uint8 volume = 63);
67 bool isMusicActive()
const;
68 void setUserMusicVolume(uint volume);
69 int getUserMusicVolume()
const;
72 void setActiveMusicVolume(uint8 volume);
73 void playRoomMusic(int16 roomNum);
75 void playSpeech(
int num,
bool waitForFinish, uint16 balance = 63);
79 bool isSpeechActive()
const;
82 void setSpeechBalance(uint16 balance = 63);
91 bool soundEnabled()
const;
92 void toggleSound(
bool enable);
94 bool musicEnabled()
const;
95 void toggleMusic(
bool enable);
97 bool speechEnabled()
const;
98 void toggleSpeech(
bool enable);
100 bool subtitlesEnabled()
const;
101 void toggleSubtitles(
bool enable);
103 void syncSoundSettings();
108 uint8 convertVolume(uint16 volume);
111 int8 convertBalance(uint16 balance);
117 int16 _curMusic = -1;
119 int _userSoundVolume = -1, _userMusicVolume = -1;
void waitForSpeechToFinish()
Definition: resource.h:187