CL_Streamed_WaveSample3
Streamed sample in wave (.wav) format.
Overview
This class providers playback support for wave (.wav) samples.
Unlike CL_Sample, 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 instead.
Inherited from public CL_StreamSoundProvider
Class members
- static CL_SoundBuffer *
create( -
const char *filename, CL_InputSourceProvider *inputprovider = NULL, bool looped = false)
CL_Streamed_WaveSample(-
const char *filename, CL_InputSourceProvider *inputprovider = NULL, bool looped = false)
- virtual
~CL_Streamed_WaveSample()
- virtual CL_StreamSoundProvider_Session *
begin_session()
- virtual void
end_session( -
CL_StreamSoundProvider_Session *session)
Members with descriptions
- static CL_SoundBuffer *
create( -
const char *filename, CL_InputSourceProvider *inputprovider = NULL, bool looped = false)
Parameters: filename - Filename of the wave file. 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_WaveSample(-
const char *filename, 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_WaveSample() -
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.