1 #ifndef __SOUND_H__ 2 #define __SOUND_H__ 3 4 #include "types.h" 5 6 /** 7 * Following definition allow to enable/disable sound support. 8 * This is mainly used for debug. 9 */ 10 #define ENABLE_SOUND 0 11 12 bool initSoundSystem(void); 13 void shutdownSoundSystem(void); 14 15 void setBGMusic(const char *filename, bool start_paused = false); 16 void toggleBGMusicPause(void); 17 void freeBGMusic(int num = -1); 18 void updateBGMusic(void); 19 20 void playSound(int num, float x, float y, float z, bool stop_if_playing = true); 21 void playSound(int num, vec3_t location = NULL, bool stop_if_playing = true); 22 int loadSound(const char *filename, float x, float y, float z, bool loop = false, bool start_playing = false, bool start_paused = true); 23 int loadSound(const char *filename, vec3_t location = NULL, bool loop = false, bool start_playing = false, bool start_paused = true); 24 int load3DSound(const char *filename, vec3_t location = NULL, bool loop = false, bool start_playing = false, bool start_paused = true); 25 void toggleSoundPause(int num = -1); 26 void freeSound(int num = -1); /**< Use the -1 parameter with care -> can generate troubles in the rest of engine */ 27 28 void SoundUpdate(vec3_t position, vec3_t forward); 29 30 const char* GetSoundErrorString(int errnum); 31 32 #endif /* __SOUND_H__ */ 33