Sound provider playback session.
More...
#include <soundprovider_session.h>
|
| SoundProvider_Session () |
|
virtual | ~SoundProvider_Session () |
|
virtual bool | eof () const =0 |
| Returns true if no more input data is available.
|
|
virtual int | get_data (float **data_ptr, int data_requested)=0 |
| Called when a playback session needs more sample data.
|
|
virtual int | get_frequency () const =0 |
| Returns the playback frequency of the input data.
|
|
virtual int | get_num_channels () const =0 |
| Returns the number of channels filled when get_data is called.
|
|
virtual int | get_num_samples () const =0 |
| Returns the number of samples in the soundbuffer.
|
|
virtual int | get_position () const =0 |
| Returns the current position in the playback stream.
|
|
virtual bool | play ()=0 |
| Start/continue playing of the stream.
|
|
virtual bool | set_end_position (int pos)=0 |
| Sets the end position within the current stream.
|
|
virtual bool | set_looping (bool) |
| Enable/disable session looping.
|
|
virtual bool | set_position (int pos)=0 |
| Sets the position within the current stream.
|
|
virtual void | stop ()=0 |
| Stops the current stream.
|
|
Sound provider playback session.
Interface used by ClanLib during playback of sound providers.
◆ SoundProvider_Session()
clan::SoundProvider_Session::SoundProvider_Session |
( |
| ) |
|
◆ ~SoundProvider_Session()
virtual clan::SoundProvider_Session::~SoundProvider_Session |
( |
| ) |
|
|
virtual |
◆ eof()
virtual bool clan::SoundProvider_Session::eof |
( |
| ) |
const |
|
pure virtual |
Returns true if no more input data is available.
- Returns
- True if end of input data. False otherwise.
◆ get_data()
virtual int clan::SoundProvider_Session::get_data |
( |
float ** |
data_ptr, |
|
|
int |
data_requested |
|
) |
| |
|
pure virtual |
Called when a playback session needs more sample data.
- Parameters
-
data_ptr | = Points to a buffer that should be filled with sample data. |
data_requested | = Samples of data requested. |
- Returns
- Number of samples actually filled with sample data.
◆ get_frequency()
virtual int clan::SoundProvider_Session::get_frequency |
( |
| ) |
const |
|
pure virtual |
Returns the playback frequency of the input data.
- Returns
- Playback frequency.
◆ get_num_channels()
virtual int clan::SoundProvider_Session::get_num_channels |
( |
| ) |
const |
|
pure virtual |
Returns the number of channels filled when get_data is called.
◆ get_num_samples()
virtual int clan::SoundProvider_Session::get_num_samples |
( |
| ) |
const |
|
pure virtual |
Returns the number of samples in the soundbuffer.
◆ get_position()
virtual int clan::SoundProvider_Session::get_position |
( |
| ) |
const |
|
pure virtual |
Returns the current position in the playback stream.
◆ play()
virtual bool clan::SoundProvider_Session::play |
( |
| ) |
|
|
pure virtual |
Start/continue playing of the stream.
- Returns
- True for success. False otherwise.
◆ set_end_position()
virtual bool clan::SoundProvider_Session::set_end_position |
( |
int |
pos | ) |
|
|
pure virtual |
Sets the end position within the current stream.
- Parameters
-
- Returns
- True for success. False otherwise.
◆ set_looping()
virtual bool clan::SoundProvider_Session::set_looping |
( |
bool |
| ) |
|
|
inlinevirtual |
Enable/disable session looping.
If this function returns false (default), the clanSound mixer will manually try to simulate looping by setting the position to 0 when eof is encountered.
◆ set_position()
virtual bool clan::SoundProvider_Session::set_position |
( |
int |
pos | ) |
|
|
pure virtual |
Sets the position within the current stream.
- Parameters
-
- Returns
- True for success. False otherwise.
◆ stop()
virtual void clan::SoundProvider_Session::stop |
( |
| ) |
|
|
pure virtual |
Stops the current stream.
The documentation for this class was generated from the following file: