00001 // --------------------------------------------------------------------------- 00002 // PLATFORM: All - 00003 // PRODUCT: Fourplay - 00004 // VISIBILITY: Public - 00005 // --------------------------------------------------------------------------- 00006 // - 00007 // PURPOSE: A singleton class which can play and stop audio files. - 00008 // To be used for playing background music and sound effects. - 00009 // - 00010 // --------------------------------------------------------------------------- 00011 00012 #ifndef AUDIOMANAGER_H 00013 #define AUDIOMANAGER_H 00014 00015 #include <string> 00016 #include "audio.h" 00017 00024 class AudioManager 00025 { 00026 public: 00031 static AudioManager* Instance(); 00032 00036 static void DestroyInstance(); 00037 00042 void PlaySound(char* fileName); 00043 00048 void PlayMusic(char* fileName); 00049 00053 void StopMusic(); 00054 00058 void Update(); 00059 00060 protected: 00064 AudioManager(); 00065 00069 ~AudioManager(); 00070 00072 static AudioManager *m_instance; 00073 }; 00074 00075 #endif