00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #if !defined(__AUDIO_H__)
00014 #define __AUDIO_H__
00015
00016 #include "IwSound.h"
00017 #include <list>
00018
00025 class AudioSound
00026 {
00027 public:
00028 AudioSound() : m_SoundData(0), m_SoundSpec(0) {}
00029 ~AudioSound();
00030 unsigned int m_NameHash;
00031 CIwSoundData* m_SoundData;
00032 CIwSoundSpec* m_SoundSpec;
00033
00045 bool Load(const char* filename);
00046 };
00047
00073 class Audio
00074 {
00075 protected:
00076 public:
00077 Audio();
00078 ~Audio();
00079
00080 std::list<AudioSound*> m_Sounds;
00090 AudioSound* findSound(unsigned int name_hash);
00091
00099 void Update();
00100
00110 static void PlayMusic(const char* filename, bool repeat = true);
00117 static void StopMusic();
00130 AudioSound* PreloadSound(const char* filename);
00140 void PlaySound(const char* filename);
00141 };
00142
00146 extern Audio* g_pAudio;
00147
00148
00149
00150 #endif // __AUDIO_H__
00151
00152