Main Page   Namespace List   Class Hierarchy   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 SDL Game Development.
00003                       Copyright (C) 2002 ConceptOfZero.net
00004 
00005              Licensed under the BSD License, see licensing.txt.
00006 
00007     The maintainer of this library is James Turk (jturk@conceptofzero.net) 
00008          and the home of this Library is http://www.conceptofzero.net/
00009 *******************************************************************************/
00010 
00024 #ifndef __ze_zsound_h__
00025 #define __ze_zsound_h__
00026 
00027 #include "ZE_ZObject.h"
00028 
00029 #ifdef USE_SDL_MIXER
00030 
00031 namespace ZE
00032 {
00033 
00039 class ZSound : public ZObject 
00040 {
00041     protected:
00043         Mix_Chunk* rSound;
00045         int rChannelID;
00046 
00047     public:
00049         static const int LoopInfinite;
00050 
00052         //Opening and Closing//
00054 
00060         ZSound();
00061 
00068         ZSound(string filename);
00069 
00075         ~ZSound();
00076 
00083         void Open(string filename);
00084 
00090         void Release();
00091 
00093         //Play Controls//
00095 
00104         void Play(int loopNum=0, int fadeTime=0);
00105 
00111         void Pause();
00112 
00118         void Unpause();
00119 
00126         void Stop(int fadeTime=0);
00127 
00134         void SetVolume(int volume);
00135 
00137         //Accessors//
00139 
00146         bool IsLoaded();
00147 
00154         bool IsPlaying();
00155 
00162         bool IsPaused();
00163 
00170         int Volume();
00171 };
00172 
00173 
00174 }
00175 
00176 #endif //USE_SDL_MIXER
00177 
00178 #endif //__ze_zsound_h__

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.2.18