+ /// Is music enabled?
+ bool music_enabled()
+ {
+ return m_music_enabled;
+ }
+
+ /// Enable/Disable sound.
+ void enable_sound(bool enable);
+
+ /// Is sound enabled?
+ bool sound_enabled()
+ {
+ return m_sound_enabled;
+ }
+
+ /* functions handling the sound and music */
+ int open_audio(int frequency, Uint16 format, int channels, int chunksize);
+ void close_audio( void );
+
+ /// Is audio available?
+ bool audio_device_available()
+ {
+ return audio_device;
+ }
+
+ void set_audio_device_available(bool available)
+ {
+ audio_device = available;
+ }
+
+ static SoundManager* get()
+ {
+ return instance_ ? instance_ : instance_ = new SoundManager();
+ }
+ static void destroy_instance()
+ {
+ delete instance_;
+ instance_ = 0;
+ }
+
+ void add_sound(Mix_Chunk* sound, int id)
+ {
+ sounds[id] = sound;
+ }
+
+ Mix_Chunk* get_sound(int id)
+ {
+ return sounds[id];
+ }
+