ClanSoft logo
ClanSoft logo
Entire Class Index Main Class Index Cross Index Global Index

Class CL_MPEGSoundProvider_Session

MPEG Sound Provider Session class
Contained in: global
Derived from: CL_StreamSoundProvider_Session MPEGAudioDrv
Derived by: none
Group: MPEG (System)

#include <ClanLib/mpeg.h>


public function member index:

Construction:

CL_MPEGSoundProvider_Session(const char* filename);
virtual ~CL_MPEGSoundProvider_Session();

Operations:

virtual void stop();
virtual bool play();
virtual bool set_position(int pos);

Attributes:

virtual bool eof() const;
virtual int get_data(void* data_ptr, int data_requested);
virtual int get_frequency() const;
virtual SoundFormat get_format() const;
 

protected function member index:

Implementation:

virtual bool Open(MPEGAudioSpec* desired, MPEGAudioSpec* optained);
virtual void Close();
virtual void Pause(bool enable);
virtual void Mix(Uint8* dst, Uint8* src, Uint32 len, int volume);
virtual void Lock();
virtual void Unlock();
virtual int GetMaxVolume();
virtual char* GetError();
 

Description:


Function Member Descriptions:

CL_MPEGSoundProvider_Session::CL_MPEGSoundProvider_Session - MPEG Sound Provider Session constructor
CL_MPEGSoundProvider_Session(const char* filename);


CL_MPEGSoundProvider_Session::eof - Returns true if no more input data is available.
virtual bool eof() const;
Returns - True if end of input data. False otherwise.



CL_MPEGSoundProvider_Session::get_data - Called when a playback session needs more sample data.
virtual int get_data(void* data_ptr, int data_requested);
data_ptr - Points to a buffer that should be filled with
sample data.
data_requested - Bytes of data requested.
Returns - Number of bytes actually filled with sample data.



CL_MPEGSoundProvider_Session::get_format - Returns the playback sample format.
virtual SoundFormat get_format() const;
Returns - The playback Sample format.



CL_MPEGSoundProvider_Session::get_frequency - Returns the playback frequency of the input data.
virtual int get_frequency() const;
Returns - Playback frequency.



CL_MPEGSoundProvider_Session::play - Start/continue playing of the stream.
virtual bool play();
Returns - True for success. False otherwise.



CL_MPEGSoundProvider_Session::set_position - Sets the position within the current stream.
virtual bool set_position(int pos);
pos - Position to seek to.
Returns - True for success. False otherwise.



CL_MPEGSoundProvider_Session::stop - Stops the current stream.
virtual void stop();


CL_MPEGSoundProvider_Session::~CL_MPEGSoundProvider_Session - MPEG Sound Provider Session destructor
virtual ~CL_MPEGSoundProvider_Session();



Variable Member Descriptions: