CL_SoundProvider_Raw Class Reference
[clanSound Sound Providers]

Sound provider in a raw PCM format (no header in file). More...

#include <soundprovider_raw.h>

Inheritance diagram for CL_SoundProvider_Raw:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Construction

 CL_SoundProvider_Raw (void *sound_data, int num_samples, int bytes_per_sample, bool stereo, int frequency=22050)
 Constructs a sound provider based on some raw PCM data.
virtual ~CL_SoundProvider_Raw ()
Operations

virtual CL_SoundProvider_Sessionbegin_session ()
 Called by CL_SoundBuffer when a new session starts.
virtual void end_session (CL_SoundProvider_Session *session)
 Called by CL_SoundBuffer when a session has finished. After this call,.

Implementation



class CL_SoundProvider_Raw_Session

Detailed Description

Sound provider in a raw PCM format (no header in file).


Constructor & Destructor Documentation

CL_SoundProvider_Raw::CL_SoundProvider_Raw ( void *  sound_data,
int  num_samples,
int  bytes_per_sample,
bool  stereo,
int  frequency = 22050 
)

Constructs a sound provider based on some raw PCM data.

Parameters:
sound_data Raw PCM data.
num_samples Number of samples to be read out of sound_data.
bytes_per_sample The size of a sample in bytes. This is 2 for 16 bit (signed), and 1 for 8 bit (unsigned).
stereo True if sound is stereo (two channels).
frequency Playback frequency for sample data.
virtual CL_SoundProvider_Raw::~CL_SoundProvider_Raw (  )  [virtual]

Member Function Documentation

virtual CL_SoundProvider_Session* CL_SoundProvider_Raw::begin_session (  )  [virtual]

Called by CL_SoundBuffer when a new session starts.

Returns:
The soundbuffer session to be attached to the newly started session.

Implements CL_SoundProvider.

virtual void CL_SoundProvider_Raw::end_session ( CL_SoundProvider_Session session  )  [virtual]

Called by CL_SoundBuffer when a session has finished. After this call,.

CL_SoundBuffer will not access the session anymore. It can safely be deleted here (and in most cases should be delete here).

Implements CL_SoundProvider.


Friends And Related Function Documentation

friend class CL_SoundProvider_Raw_Session [friend]

The documentation for this class was generated from the following file: