Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members  

/include/ZE_ZSound.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_zsound_h__
00021 #define __ze_zsound_h__
00022 
00023 #include "ZE_ZEngine.h"
00024 
00025 #ifdef USE_SDL_MIXER
00026 
00027 namespace ZE
00028 {
00029 
00035 class ZSound
00036 {
00037     protected:
00039         ZEngine* rEngine;
00041         Mix_Chunk* rSound;
00043         int rChannelID;
00044 
00045     public:
00047         static const int LoopInfinite;
00048 
00050         //Opening and Closing//
00052 
00058         ZSound();
00059 
00066         ZSound(std::string filename);
00067 
00073         virtual ~ZSound();
00074 
00081         void Open(std::string filename);
00082 
00088         void Release();
00089 
00091         //Play Controls//
00093 
00102         void Play(int loopNum=0, int fadeTime=0);
00103 
00109         void Pause() const;
00110 
00116         void Unpause() const;
00117 
00124         void Stop(int fadeTime=0) const;
00125 
00132         void SetVolume(int volume);
00133 
00135         //Accessors//
00137 
00144         bool IsLoaded() const;
00145 
00152         bool IsPlaying() const;
00153 
00160         bool IsPaused() const;
00161 
00168         int Volume() const;
00169 };
00170 
00171 
00172 }
00173 
00174 #endif //USE_SDL_MIXER
00175 
00176 #endif //__ze_zsound_h__

Generated on Sun Jun 29 14:13:51 2003 for ZEngine by doxygen1.3