diff --git a/include/ZE_ZMusic.h b/include/ZE_ZMusic.h index bbcbf7e..f2eb805 100644 --- a/include/ZE_ZMusic.h +++ b/include/ZE_ZMusic.h @@ -12,23 +12,61 @@ #define __ze_zmusic_h__ #include "ZE_ZEngine.h" -#include "ZE_ZSoundBase.h" - -#ifdef USE_AUDIERE +#include "ZE_ZAudioBase.h" namespace ZE { -class ZMusic : public ZSoundBase +#if SND_BACKEND == ZE_MIXER + +class ZMusic +{ + protected: + ZEngine* rEngine; + Mix_Music *rMusic; + public: + static const int LoopInfinite; + + ZMusic(); + ZMusic(std::string filename); + virtual ~ZMusic(); + + void Open(std::string filename); + //void OpenFromZip(std::string zipname, std::string filename); + void OpenFromZRF(std::string resourceId); + void Release(); + + void Play(int loopNum=0, int fadeTime=0) const; + void Pause() const; + void Unpause() const; + void Rewind() const; + void Stop(int fadeTime=0) const; + + void SetVolume(int volume); + void SetPosition(int position); + + bool IsLoaded() const; + bool IsPlaying() const; + bool IsPaused() const; + bool IsSeekable() const; + int GetVolume() const; +}; + +#elif SND_BACKEND == ZE_AUDIERE + +class ZMusic : public ZAudioBase { public: ZMusic(); ZMusic(std::string filename); + void Open(std::string filename); + void OpenFromZip(std::string zipname, std::string filename); + void OpenFromZRF(std::string resourceId); }; +#endif //SND_BACKEND + } -#endif //USE_AUDIERE - #endif //__ze_zmusic_h__