00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00024 #ifndef __ze_zmusic_h__
00025 #define __ze_zmusic_h__
00026 
00027 #include "ZE_ZEngine.h"
00028 
00029 #ifdef USE_SDL_MIXER
00030 
00031 namespace ZE
00032 {
00033 
00039 class ZMusic
00040 {
00041     protected:
00043         ZEngine* rEngine;
00045         Mix_Music *rMusic;
00046 
00047     public:
00049         static const int LoopInfinite;
00050 
00052         
00054 
00060         ZMusic();
00061 
00068         ZMusic(string filename);
00069 
00075         virtual ~ZMusic();
00076 
00083         void Open(string filename);
00084 
00090         void Release();
00091 
00093         
00095 
00104         void Play(int loopNum=0, int fadeTime=0) const;
00105 
00111         void Pause() const;
00112 
00118         void Unpause() const;
00119 
00125         void Rewind() const;
00126 
00133         void Stop(int fadeTime=0) const;
00134 
00141         void SetVolume(int volume);
00142 
00144         
00146 
00153         bool IsLoaded() const;
00154 
00161         bool IsPlaying() const;
00162 
00169         bool IsPaused() const;
00170 
00177         int Volume() const;
00178 };
00179 
00180 
00181 }
00182 
00183 #endif //USE_SDL_MIXER
00184 
00185 #endif //__ze_zmusic_h__