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

CL_SoundBuffer Class Reference

also: CL_StaticSoundProvider - Static sample data source.also: CL_StreamSoundProvider - Streamed sample data source.also: CL_SoundBuffer_Session - Sample playback control. More...

#include <soundbuffer.h>

Collaboration diagram for CL_SoundBuffer:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual ~CL_SoundBuffer ()
 CL_SoundBuffer (const char *res_id, CL_ResourceManager *manager)
 retval: The created soundbuffer.

 CL_SoundBuffer (CL_StaticSoundProvider *provider, bool delete_provider=false, class CL_Resource *resource=NULL)
 CL_SoundBuffer (CL_StreamSoundProvider *provider, bool delete_provider=false, class CL_Resource *resource=NULL)
 CL_SoundBuffer (const CL_SoundBuffer &copy)
CL_StaticSoundProviderget_static_provider () const
CL_StreamSoundProviderget_stream_provider () const
 retval: The static soundprovider or NULL if none.

int get_length () const
 retval: The streamed soundprovider of NULL if none.

int get_num_samples () const
 retval: Length of soundbuffer.

int get_frequency () const
 retval: Number of samples in soundbuffer.

bool set_frequency (int new_freq)
 retval: Default/start frequency.

float get_volume () const
 param: new_freq - The new default frequency.retval: True if successful, false otherwise.

bool set_volume (float new_volume)
 retval: The volume.

float get_pan () const
 param: new_volume - The new default volume.retval: True if successful, false otherwise.

bool set_pan (float new_pan)
 retval: The panning position.

bool is_playing (CL_SoundBuffer_Session **session=NULL, CL_SoundCard *card=NULL) const
 param: new_pan - The new default panning position.retval: True if successful, false otherwise.

void stop (CL_SoundCard *card=NULL)
 param: session - Pointer to session-pointer, set to point to the first session param: playing this soundbuffer. Return value is only valid if function returns true.

CL_SoundBuffer_Session play (bool looping=false, CL_SoundCard *card=NULL)
CL_SoundBuffer_Session prepare (bool looping=false, CL_SoundCard *card=NULL)
 param: card - Soundcard to be used - NULL means use the current selectedparam: sound card (CL_Sound::get_selected_card().retval: The playback session.


Public Attributes

class CL_SoundBuffer_Genericimpl
 param: card - Soundcard to be used or NULL to useparam: CL_Sound::get_selected_card().retval: The playback session.implementation:.


Static Public Methods

CL_SoundBuffer* load (const char *res_id, CL_ResourceManager *manager)
CL_SoundBuffer* create (CL_StaticSoundProvider *provider, bool delete_provider=false)
CL_SoundBuffer* create (CL_StreamSoundProvider *provider, bool delete_provider=false)
 retval: The created soundbuffer.


Detailed Description

also: CL_StaticSoundProvider - Static sample data source.also: CL_StreamSoundProvider - Streamed sample data source.also: CL_SoundBuffer_Session - Sample playback control.

Definition at line 27 of file soundbuffer.h.


Constructor & Destructor Documentation

virtual CL_SoundBuffer::~CL_SoundBuffer ( ) [virtual]
 

CL_SoundBuffer::CL_SoundBuffer ( const char * res_id,
CL_ResourceManager * manager )
 

retval: The created soundbuffer.

CL_SoundBuffer::CL_SoundBuffer ( CL_StaticSoundProvider * provider,
bool delete_provider = false,
class CL_Resource * resource = NULL )
 

CL_SoundBuffer::CL_SoundBuffer ( CL_StreamSoundProvider * provider,
bool delete_provider = false,
class CL_Resource * resource = NULL )
 

CL_SoundBuffer::CL_SoundBuffer ( const CL_SoundBuffer & copy )
 


Member Function Documentation

CL_SoundBuffer* CL_SoundBuffer::create ( CL_StreamSoundProvider * provider,
bool delete_provider = false ) [static]
 

retval: The created soundbuffer.

CL_SoundBuffer* CL_SoundBuffer::create ( CL_StaticSoundProvider * provider,
bool delete_provider = false ) [static]
 

Referenced by CL_Sample_RawData::create().

int CL_SoundBuffer::get_frequency ( ) const
 

retval: Number of samples in soundbuffer.

int CL_SoundBuffer::get_length ( ) const
 

retval: The streamed soundprovider of NULL if none.

int CL_SoundBuffer::get_num_samples ( ) const
 

retval: Length of soundbuffer.

float CL_SoundBuffer::get_pan ( ) const
 

param: new_volume - The new default volume.retval: True if successful, false otherwise.

CL_StaticSoundProvider* CL_SoundBuffer::get_static_provider ( ) const
 

CL_StreamSoundProvider * CL_SoundBuffer::get_stream_provider ( ) const
 

retval: The static soundprovider or NULL if none.

float CL_SoundBuffer::get_volume ( ) const
 

param: new_freq - The new default frequency.retval: True if successful, false otherwise.

bool CL_SoundBuffer::is_playing ( CL_SoundBuffer_Session ** session = NULL,
CL_SoundCard * card = NULL ) const
 

param: new_pan - The new default panning position.retval: True if successful, false otherwise.

CL_SoundBuffer* CL_SoundBuffer::load ( const char * res_id,
CL_ResourceManager * manager ) [static]
 

CL_SoundBuffer_Session CL_SoundBuffer::play ( bool looping = false,
CL_SoundCard * card = NULL )
 

CL_SoundBuffer_Session CL_SoundBuffer::prepare ( bool looping = false,
CL_SoundCard * card = NULL )
 

param: card - Soundcard to be used - NULL means use the current selectedparam: sound card (CL_Sound::get_selected_card().retval: The playback session.

bool CL_SoundBuffer::set_frequency ( int new_freq )
 

retval: Default/start frequency.

bool CL_SoundBuffer::set_pan ( float new_pan )
 

retval: The panning position.

bool CL_SoundBuffer::set_volume ( float new_volume )
 

retval: The volume.

void CL_SoundBuffer::stop ( CL_SoundCard * card = NULL )
 

param: session - Pointer to session-pointer, set to point to the first session param: playing this soundbuffer. Return value is only valid if function returns true.


Member Data Documentation

class CL_SoundBuffer_Generic * CL_SoundBuffer::impl
 

param: card - Soundcard to be used or NULL to useparam: CL_Sound::get_selected_card().retval: The playback session.implementation:.

Definition at line 157 of file soundbuffer.h.


The documentation for this class was generated from the following file:
Generated at Wed Apr 4 19:57:27 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001