CL_Streamed_RawSample3
Streamed sample in raw pcm format (no header).
Overview
This class providers playback support for raw PCM samples. That is just the PCM sample data, not header.
Unlike CL_Sample_Raw, this class doesn't load the entire PCM stream into memory. Instead it slowly loads it from disk as the data is needed. With very large samples, this is a very good idea.
If the sample is small and used a lot, you should consider using CL_Sample_Raw instead.
Inherited from public CL_StreamSoundProvider
Class members
- static CL_SoundBuffer *
create( -
const char *filename, SoundFormat format, int frequency, CL_InputSourceProvider *inputprovider = NULL, bool looped = false)
CL_Streamed_RawSample(-
const char *filename, SoundFormat format, int frequency, CL_InputSourceProvider *inputprovider = NULL, bool looped = false)
- virtual
~CL_Streamed_RawSample()
- virtual CL_StreamSoundProvider_Session *
begin_session()
- virtual void
end_session( -
CL_StreamSoundProvider_Session *session)
Members with descriptions
- static CL_SoundBuffer *
create( -
const char *filename, SoundFormat format, int frequency, CL_InputSourceProvider *inputprovider = NULL, bool looped = false)
Parameters: filename - Filename of the raw PCM stream. frequency - Default playback frequency. inputprovider - Input source (datafile, regular file). If NULL it defaults to a regular file. looped - True if the streamed should be looped (stream never ends).
Description:
Creates a soundbuffer using this provider.
Return value:
The soundbuffer created.
CL_Streamed_RawSample(-
const char *filename, SoundFormat format, int frequency, CL_InputSourceProvider *inputprovider = NULL, bool looped = false)
Parameters: filename - Filename of the raw PCM stream. frequency - Default playback frequency. inputprovider - Input source (datafile, regular file). If NULL it defaults to a regular file. looped - True if the streamed should be looped (stream never ends).
Description:
Constructs an instance of this class.
- virtual
~CL_Streamed_RawSample() -
Description:
- virtual CL_StreamSoundProvider_Session *
begin_session() -
Description:
Called by the sound implementation when a session is begun.
- virtual void
end_session( -
CL_StreamSoundProvider_Session *session)
Description:
Called by the sound implementation just before a playback session has ended.