00001 /* 00002 $Id: soundbuffer_generic.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_generic 00016 #define header_soundbuffer_generic 00017 00018 #include "API/Sound/soundbuffer_session.h" 00019 00020 class CL_SoundBuffer_Generic 00021 { 00022 public: 00023 CL_SoundBuffer_Generic(class CL_Resource *resource = NULL); 00024 virtual ~CL_SoundBuffer_Generic(); 00025 00026 int add_reference(); 00027 int release_reference(); 00028 00029 virtual class CL_StaticSoundProvider *get_static_provider() const=0; 00030 virtual class CL_StreamSoundProvider *get_stream_provider() const=0; 00031 virtual int get_length() const=0; 00032 virtual int get_num_samples() const=0; 00033 virtual int get_frequency() const=0; 00034 virtual bool set_frequency(int new_freq)=0; 00035 virtual float get_volume() const=0; 00036 virtual bool set_volume(float new_volume)=0; 00037 virtual float get_pan() const=0; 00038 virtual bool set_pan(float new_pan)=0; 00039 virtual bool is_playing(CL_SoundBuffer_Session **session=NULL, class CL_SoundCard *card=NULL) const=0; 00040 virtual void stop(class CL_SoundCard *card=NULL)=0; 00041 virtual CL_SoundBuffer_Session play(bool looping=false, class CL_SoundCard *card=NULL)=0; 00042 virtual CL_SoundBuffer_Session prepare(bool looping=false, class CL_SoundCard *card=NULL)=0; 00043 00044 private: 00045 class CL_Resource *resource; 00046 int ref; 00047 }; 00048 00049 #endif
1.2.6 written by Dimitri van Heesch,
© 1997-2001