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

soundbuffer_stream_dx.h

Go to the documentation of this file.
00001 #ifndef header_soundbuffer_stream_dx
00002 #define header_soundbuffer_stream_dx
00003 
00004 #include "API/Core/Sound/stream_soundprovider.h"
00005 #include "Core/Sound/Generic/cardsoundbuffer_playback.h"
00006 #include "Core/Sound/Generic/soundcard_generic.h"
00007 #include "Core/Sound/Generic/soundbuffer_stream.h"
00008 #include "API/Core/System/keep_alive.h"
00009 #include "soundcard_dx.h"
00010 
00011 class CL_CardSoundBufferPlaybackStream_DX : public CL_CardSoundBuffer_Playback, CL_KeepAlive
00012 {
00013         CL_SoundCard_DX *parent_card;
00014         LPDIRECTSOUNDBUFFER soundbuffer;
00015         CL_StreamSoundProvider *provider;
00016         CL_StreamSoundProvider_Session *provider_session;
00017         CL_SoundBuffer_Generic_Stream *buffer;
00018 
00019         bool sound_is_playing;
00020         DWORD size_buffer;
00021         int cur_write_pos;
00022         DWORD fill_length;
00023         DWORD fill_position;
00024         DWORD secure_distance;
00025 
00026         bool wait_for_play_wrap;
00027         DWORD empty_pos;
00028 
00029         void update_buffer();
00030 public:
00031 
00032         CL_CardSoundBufferPlaybackStream_DX(
00033                 CL_SoundCard_DX *card,
00034                 CL_SoundBuffer_Generic_Stream *soundbuffer);
00035         virtual ~CL_CardSoundBufferPlaybackStream_DX();
00036 
00037         // CL_CardSoundBuffer_Playback overloads
00038         virtual int get_position();
00039         virtual float get_position_relative();
00040 
00041         virtual bool set_position(int new_pos);
00042         virtual bool set_position_relative(float new_pos);
00043 
00044         virtual int get_length();
00045 
00046         virtual int get_frequency();
00047         virtual bool set_frequency(int new_freq);
00048 
00049         virtual float get_volume();
00050         virtual bool set_volume(float new_volume);
00051 
00052         virtual float get_pan();
00053         virtual bool set_pan(float new_pan);
00054 
00055         virtual void play();
00056         virtual void stop();
00057 
00058         virtual bool is_playing();
00059         virtual void set_looping(bool loop);
00060 
00061         virtual void keep_alive();
00062 
00063 
00064 
00065         virtual CL_SoundBuffer_Generic *get_owner();
00066 };
00067 
00068 #endif

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