00001 /* 00002 $Id: soundbuffer_stream.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_stream 00016 #define header_soundbuffer_stream 00017 00018 #include "API/Sound/soundbuffer.h" 00019 #include "soundbuffer_generic.h" 00020 00021 class CL_CardSoundBuffer_Playback; 00022 00023 class CL_SoundBuffer_Generic_Stream : public CL_SoundBuffer_Generic 00024 { 00025 protected: 00026 CL_StreamSoundProvider *provider; 00027 bool delete_provider; 00028 00029 float volume, pan; 00030 int frequency; 00031 00032 public: 00033 CL_SoundBuffer_Generic_Stream( 00034 CL_StreamSoundProvider *provider, 00035 bool delete_provider, 00036 CL_Resource *resource); 00037 00038 virtual ~CL_SoundBuffer_Generic_Stream(); 00039 00040 virtual CL_StaticSoundProvider *get_static_provider() const { return NULL; } 00041 virtual CL_StreamSoundProvider *get_stream_provider() const; 00042 00043 virtual int get_length() const; 00044 virtual int get_num_samples() const; 00045 00046 virtual int get_frequency() const; 00047 virtual bool set_frequency(int new_freq); 00048 00049 virtual float get_volume() const; 00050 virtual bool set_volume(float new_volume); 00051 00052 virtual float get_pan() const; 00053 virtual bool set_pan(float new_pan); 00054 00055 virtual bool is_playing(CL_SoundBuffer_Session **session=NULL, CL_SoundCard *card=NULL) const; 00056 virtual void stop(CL_SoundCard *card=NULL); 00057 00058 virtual CL_SoundBuffer_Session play(bool looping=false, CL_SoundCard *card=NULL); 00059 virtual CL_SoundBuffer_Session prepare(bool looping=false, CL_SoundCard *card=NULL); 00060 }; 00061 00062 #endif
1.2.6 written by Dimitri van Heesch,
© 1997-2001