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

playback_static.h

Go to the documentation of this file.
00001 /*
00002         $Id: playback_static.h,v 1.1 2001/03/06 15:09:25 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_playback_static
00016 #define header_playback_static
00017 
00018 #ifdef USE_CLANSOUND
00019 
00020 #include "cardplayback_clan.h"
00021 #include "soundbuffer_static_clan.h"
00022 
00023 class CL_Playback_Static : public CL_CardPlayback_ClanSound
00024 {
00025 public:
00026         CL_Playback_Static(
00027                 CL_SoundCard_ClanSound *card,
00028                 CL_CardBuffer_Static_ClanSound *static_buffer);
00029 
00030         virtual ~CL_Playback_Static();
00031 
00032         // Functions inherited from Generic:
00033         // ---------------------------------
00034         virtual int get_position();
00035         virtual float get_position_relative();
00036 
00037         virtual bool set_position(int new_pos);
00038         virtual bool set_position_relative(float new_pos);
00039 
00040         virtual int get_length(); // -1 if unknown
00041 
00042         virtual int get_frequency();
00043         virtual bool set_frequency(int new_freq);
00044 
00045         virtual float get_volume();
00046         virtual bool set_volume(float new_volume);
00047 
00048         virtual float get_pan();
00049         virtual bool set_pan(float new_pan);
00050 
00051         virtual void set_looping(bool looping);
00052         virtual bool get_looping();
00053 
00054         virtual void play();
00055         virtual void stop();
00056 
00057         virtual bool is_playing();
00058         
00059         virtual CL_SoundBuffer_Generic *get_owner()
00060         {
00061                 return static_buffer->get_owner();
00062         }
00063 
00064         // Mixer interface (from cardplayback_clansound):
00065         // ----------------------------------------------
00066         
00067         virtual void get_playback_data(int *data, int num_samples);
00068         virtual void mix_to(int *data, int num_samples);
00069 
00070 private:
00071         CL_CardBuffer_Static_ClanSound *static_buffer;
00072 
00073         float volume;
00074         float pan;
00075         int frequency;
00076         double pos;
00077         bool playing;
00078 };
00079 
00080 #endif /* USE_CLANSOUND */
00081 #endif

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