00001 /* 00002 $Id: soundbuffer_static.h,v 1.1 2001/03/06 15:09:26 mbn Exp $ 00003 00004 ------------------------------------------------------------------------ 00005 ClanLib, the platform independent game SDK. 00006 00007 This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE 00008 version 2. See COPYING for details. 00009 00010 For a total list of contributers see CREDITS. 00011 00012 ------------------------------------------------------------------------ 00013 */ 00014 00015 #ifndef header_soundbuffer_static 00016 #define header_soundbuffer_static 00017 00018 #include "API/Sound/soundbuffer.h" 00019 #include "API/Sound/static_soundprovider.h" 00020 #include "cardsoundbuffer_static.h" 00021 #include "soundbuffer_generic.h" 00022 00023 class CL_SoundBuffer_Generic_Static : public CL_SoundBuffer_Generic 00024 { 00025 protected: 00026 CL_StaticSoundProvider *provider; 00027 CL_CardSoundBuffer_Static **card_buffers; 00028 bool delete_provider; 00029 00030 float volume, pan; 00031 int frequency; 00032 00033 public: 00034 CL_SoundBuffer_Generic_Static( 00035 CL_StaticSoundProvider *provider, 00036 bool delete_provider, 00037 CL_Resource *resource); 00038 00039 virtual ~CL_SoundBuffer_Generic_Static(); 00040 00041 virtual CL_StaticSoundProvider *get_static_provider() const; 00042 virtual CL_StreamSoundProvider *get_stream_provider() const { return NULL; } 00043 00044 virtual int get_length() const; 00045 virtual int get_num_samples() const; 00046 00047 virtual int get_frequency() const; 00048 virtual bool set_frequency(int new_freq); 00049 00050 virtual float get_volume() const; 00051 virtual bool set_volume(float new_volume); 00052 00053 virtual float get_pan() const; 00054 virtual bool set_pan(float new_pan); 00055 00056 virtual bool is_playing(CL_SoundBuffer_Session **session=NULL, CL_SoundCard *card=NULL) const; 00057 virtual void stop(CL_SoundCard *card=NULL); 00058 00059 virtual CL_SoundBuffer_Session play(bool looping=false, CL_SoundCard *card=NULL); 00060 virtual CL_SoundBuffer_Session prepare(bool looping=false, CL_SoundCard *card=NULL); 00061 }; 00062 00063 #endif
1.2.6 written by Dimitri van Heesch,
© 1997-2001