Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_StreamSoundProvider_Session

Streamed soundprovider playback session
Contained in: global
Derived from: none
Derived by: CL_Streamed_MikModSample_Session CL_Streamed_RawSample_Session CL_Streamed_WaveSample_Session
Group: Sound (Audio Mixing)

#include <ClanLib/sound.h>

### public function member index:

### Construction:

``virtual`` | `~CL_StreamSoundProvider_Session` | `()`;

### Operations:

``virtual` `bool`` | `eof` | `() `const``;
``virtual` `void`` | `stop` | `()`;
``virtual` `bool`` | `play` | `()`;
``virtual` `bool`` | `set_position` | `(`int` `pos`)`;

### Attributes:

``virtual` `int`` | `get_data` | `(`void`* `data_ptr`, `int` `data_requested`)`;
``virtual` `int`` | `get_frequency` | `() `const``;
``virtual` `SoundFormat`` | `get_format` | `() `const``;

## Description:

Interface used by ClanLib during playback of streamed soundbuffers.

## Function Member Descriptions:

CL_StreamSoundProvider_Session::eof - Returns true if no more input data is available.
``virtual` `bool`` `eof` `() `const``;

> Returns - True if end of input data. False otherwise.

CL_StreamSoundProvider_Session::get_data - Called when a playback session needs more sample data.
``virtual` `int`` `get_data` `(`void`* `data_ptr`, `int` `data_requested`)`;

> data_ptr - Points to a buffer that should be filled with
> sample data.
> data_requested - Bytes of data requested.
> Returns - Number of bytes actually filled with sample data.

CL_StreamSoundProvider_Session::get_format - Returns the playback sample format.
``virtual` `SoundFormat`` `get_format` `() `const``;

> Returns - The playback Sample format.

CL_StreamSoundProvider_Session::get_frequency - Returns the playback frequency of the input data.
``virtual` `int`` `get_frequency` `() `const``;

> Returns - Playback frequency.

CL_StreamSoundProvider_Session::play - Start/continue playing of the stream.
``virtual` `bool`` `play` `()`;

> Returns - True for success. False otherwise.

CL_StreamSoundProvider_Session::set_position - Sets the position within the current stream.
``virtual` `bool`` `set_position` `(`int` `pos`)`;

> pos - Position to seek to.
> Returns - True for success. False otherwise.

CL_StreamSoundProvider_Session::stop - Stops the current stream.
``virtual` `void`` `stop` `()`;

CL_StreamSoundProvider_Session::~CL_StreamSoundProvider_Session - Stream Sound Provider Session Destructor
``virtual`` `~CL_StreamSoundProvider_Session` `()`;