22 #ifndef NUVIE_SOUND_SOUND_MANAGER_H 23 #define NUVIE_SOUND_SOUND_MANAGER_H 33 #include "mididrv_m_adlib.h" 34 #include "mididrv_m_mt32.h" 35 #include "midiparser_m.h" 37 #include "ultima/nuvie/sound/sound.h" 38 #include "ultima/nuvie/sound/song.h" 39 #include "ultima/nuvie/core/nuvie_defs.h" 40 #include "ultima/nuvie/conf/configuration.h" 41 #include "ultima/nuvie/files/nuvie_io_file.h" 42 #include "ultima/nuvie/sound/sfx.h" 44 #include "audio/mixer.h" 45 #include "audio/mididrv.h" 46 #include "common/mutex.h" 51 #define SFX_PLAY_ASYNC true 52 #define SFX_PLAY_SYNC false 64 struct SongMT32InstrumentMapping {
70 const static SongMT32InstrumentMapping DEFAULT_MT32_INSTRUMENT_MAPPING[12];
78 void update_map_sfx();
81 void musicPlayFrom(
string group);
85 void musicPlay(
const char *filename, uint16 song_num = 0);
91 bool playSfx(uint16 sfx_id,
bool async =
false);
93 void syncSoundSettings();
95 bool is_audio_enabled() {
98 void set_audio_enabled(
bool val);
99 bool is_music_enabled() {
100 return music_enabled;
102 void set_music_enabled(
bool val);
103 bool is_speech_enabled() {
104 return speech_enabled;
106 void set_speech_enabled(
bool val);
107 bool is_sfx_enabled() {
110 void set_sfx_enabled(
bool val) {
113 uint8 get_sfx_volume() {
116 void set_sfx_volume(uint8 val) {
119 uint8 get_music_volume() {
122 void set_music_volume(uint8 val) {
125 Sound *get_m_pCurrentSong() {
126 return m_pCurrentSong;
129 bool stop_music_on_group_change;
133 bool LoadNativeU6Songs();
134 bool loadSong(
Song *song,
const Common::Path &filename,
const char *fileId);
135 bool loadSong(
Song *song,
const Common::Path &filename,
const char *fileId,
const char *title);
136 bool groupAddSong(
const char *group,
Song *song);
140 bool LoadSfxManager(
string sfx_style);
142 Sound *SongExists(
const string &name);
143 Sound *SampleExists(
const string &name);
146 Sound *RequestTileSound(
int id);
147 Sound *RequestObjectSound(
int id);
148 Sound *RequestSong(
const string &group);
150 uint16 RequestObjectSfxId(uint16 obj_n);
154 IntCollectionMap m_TileSampleMap;
155 IntCollectionMap m_ObjectSampleMap;
156 StringCollectionMap m_MusicMap;
162 string m_CurrentGroup;
163 Sound *m_pCurrentSong;
183 const SongMT32InstrumentMapping *_mt32InstrumentMapping;
189 static bool g_MusicFinished;
Definition: mididrv_m_mt32.h:32
Definition: configuration.h:61
Definition: mididrv_ms.h:86
MusicType
Definition: mididrv.h:44
Definition: midiparser_m.h:46
Definition: sfx_manager.h:33
Definition: mididrv_m_mt32.h:45
Definition: detection.h:27
Definition: sound_manager.h:62
Definition: sound_manager.h:57