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 
00020 #ifndef __ze_zmusic_h__
00021 #define __ze_zmusic_h__
00022 
00023 #include "ZE_ZEngine.h"
00024 
00025 #ifdef USE_SDL_MIXER
00026 
00027 namespace ZE
00028 {
00029 
00035 class ZMusic
00036 {
00037     protected:
00039         ZEngine* rEngine;
00041         Mix_Music *rMusic;
00042 
00043     public:
00045         static const int LoopInfinite;
00046 
00048         //Opening and Closing//
00050 
00056         ZMusic();
00057 
00064         ZMusic(std::string filename);
00065 
00071         virtual ~ZMusic();
00072 
00079         void Open(std::string filename);
00080 
00086         void Release();
00087 
00089         //Play Controls//
00091 
00100         void Play(int loopNum=0, int fadeTime=0) const;
00101 
00107         void Pause() const;
00108 
00114         void Unpause() const;
00115 
00121         void Rewind() const;
00122 
00129         void Stop(int fadeTime=0) const;
00130 
00137         void SetVolume(int volume);
00138 
00140         //Accessors//
00142 
00149         bool IsLoaded() const;
00150 
00157         bool IsPlaying() const;
00158 
00165         bool IsPaused() const;
00166 
00173         int Volume() const;
00174 };
00175 
00176 
00177 }
00178 
00179 #endif //USE_SDL_MIXER
00180 
00181 #endif //__ze_zmusic_h__

Generated on Sun Oct 5 19:34:45 2003 for ZEngine by doxygen1.3