Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

cardsoundbuffer_playback.h

Go to the documentation of this file.
00001 /*
00002         $Id: cardsoundbuffer_playback.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_cardsoundbuffer_playback
00016 #define header_cardsoundbuffer_playback
00017 
00018 #include <utility>
00019 #include <list>
00020 
00021 class CL_SoundPlayBackDesc;
00022 class CL_SoundBuffer;
00023 class CL_SoundFilter;
00024 class CL_CardSoundBuffer_Playback
00025 {
00026 public:
00027         CL_CardSoundBuffer_Playback();
00028         virtual ~CL_CardSoundBuffer_Playback();
00029         
00030         virtual class CL_SoundBuffer_Generic *get_owner()=0;
00031 
00032         virtual int get_position()=0;
00033         virtual float get_position_relative()=0;
00034 
00035         virtual bool set_position(int new_pos)=0;
00036         virtual bool set_position_relative(float new_pos)=0;
00037 
00038         virtual int get_length()=0; // -1 if unknown
00039 
00040         virtual int get_frequency()=0;
00041         virtual bool set_frequency(int new_freq)=0;
00042 
00043         virtual float get_volume()=0;
00044         virtual bool set_volume(float new_volume)=0;
00045 
00046         virtual float get_pan()=0;
00047         virtual bool set_pan(float new_pan)=0;
00048 
00049         virtual void play()=0;
00050         virtual void stop()=0;
00051 
00052         virtual bool is_playing()=0;
00053         virtual void set_looping(bool loop)=0;
00054         
00055         virtual void add_filter(CL_SoundFilter *filter, bool delete_filter);
00056         virtual void remove_filter(CL_SoundFilter *filter);
00057         
00058 protected:
00059         void filter(int *sample_data, int num_samples);
00060 
00061 private:
00062         typedef std::pair<CL_SoundFilter *, bool> FilterPair;
00063         std::list<FilterPair> filters;
00064 };
00065 
00066 #endif

Generated at Wed Apr 4 19:53:59 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001