Reference

CL_Streamed_WaveSample(3)

Streamed sample in wave (.wav) format.

NAME

CL_Streamed_WaveSample - Streamed sample in wave (.wav) format.

DESCRIPTION

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.

SEE ALSO

CL_Sample

The static wave sample provider.

CL_Sample_Raw

The static raw sample provider.

CL_Streamed_RawSample

The streamed raw sample provider.

CL_SoundBuffer

Sound playback class in ClanLib.

CL_StreamSoundProvider

Streamed sound provider interface.

CL_StaticSoundProvider

Static sound provider interface.

All ClanLib API classes can be found in clanlib (3).

AUTHORS

Originally written by Magnus Norddahl <[email protected]> and Martin Starch <[email protected]>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at http://somewhere.in.the.world.org).

See clanlib (3) to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.