Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

/include/ZE_ZMusic.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002         This file is Part of the ZEngine Library for 2D game development.
00003                    Copyright (C) 2002, 2003 James Turk
00004 
00005                      Licensed under a BSD-style license.
00006 
00007     The maintainer of this library is James Turk (james@conceptofzero.net) 
00008      and the home of this Library is http://www.zengine.sourceforge.net
00009 *******************************************************************************/
00010 
00024 #ifndef __ze_zmusic_h__
00025 #define __ze_zmusic_h__
00026 
00027 #include "ZE_ZObject.h"
00028 
00029 #ifdef USE_SDL_MIXER
00030 
00031 namespace ZE
00032 {
00033 
00039 class ZMusic : public ZObject 
00040 {
00041     protected:
00043         Mix_Music *rMusic;
00044 
00045     public:
00047         static const int LoopInfinite;
00048 
00050         //Opening and Closing//
00052 
00058         ZMusic();
00059 
00066         ZMusic(string filename);
00067 
00073         ~ZMusic();
00074 
00081         void Open(string filename);
00082 
00088         void Release();
00089 
00091         //Play Controls//
00093 
00102         void Play(int loopNum=0, int fadeTime=0) const;
00103 
00109         void Pause() const;
00110 
00116         void Unpause() const;
00117 
00123         void Rewind() const;
00124 
00131         void Stop(int fadeTime=0) const;
00132 
00139         void SetVolume(int volume);
00140 
00142         //Accessors//
00144 
00151         bool IsLoaded() const;
00152 
00159         bool IsPlaying() const;
00160 
00167         bool IsPaused() const;
00168 
00175         int Volume() const;
00176 };
00177 
00178 
00179 }
00180 
00181 #endif //USE_SDL_MIXER
00182 
00183 #endif //__ze_zmusic_h__

Generated on Tue Jan 28 16:31:28 2003 for ZEngine by doxygen1.3-rc2