00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00024 #ifndef __ze_zsound_h__
00025 #define __ze_zsound_h__
00026 
00027 #include "ZE_ZObject.h"
00028 
00029 #ifdef USE_SDL_MIXER
00030 
00031 namespace ZE
00032 {
00033 
00039 class ZSound : public ZObject 
00040 {
00041     protected:
00043         Mix_Chunk* rSound;
00045         int rChannelID;
00046 
00047     public:
00049         static const int LoopInfinite;
00050 
00052         
00054 
00060         ZSound();
00061 
00068         ZSound(string filename);
00069 
00075         ~ZSound();
00076 
00083         void Open(string filename);
00084 
00090         void Release();
00091 
00093         
00095 
00104         void Play(int loopNum=0, int fadeTime=0);
00105 
00111         void Pause();
00112 
00118         void Unpause();
00119 
00126         void Stop(int fadeTime=0);
00127 
00134         void SetVolume(int volume);
00135 
00137         
00139 
00146         bool IsLoaded();
00147 
00154         bool IsPlaying();
00155 
00162         bool IsPaused();
00163 
00170         int Volume();
00171 };
00172 
00173 
00174 }
00175 
00176 #endif //USE_SDL_MIXER
00177 
00178 #endif //__ze_zsound_h__