#include <SoundStream.hpp>
Inheritance diagram for sf::SoundStream:
Public Member Functions | |
virtual | ~SoundStream () |
Virtual destructor. | |
void | Play () |
Start playing the audio stream. | |
void | Stop () |
Stop playing the audio stream. | |
unsigned int | GetChannelsCount () const |
Return the number of channels (1 = mono, 2 = stereo). | |
unsigned int | GetSampleRate () const |
Get the stream sample rate. | |
Status | GetStatus () const |
Get the status of the stream (stopped, paused, playing). | |
float | GetPlayingOffset () const |
Get the current playing position of the stream. | |
void | SetLoop (bool Loop) |
Set the stream loop state. | |
bool | GetLoop () const |
Tell whether or not the stream is looping. | |
Protected Member Functions | |
SoundStream () | |
Default constructor. | |
void | Initialize (unsigned int ChannelsCount, unsigned int SampleRate) |
Set the audio stream parameters, you must call it before Play(). | |
Classes | |
struct | Chunk |
Structure defining a chunk of audio data to stream. More... |
Use it for big sounds that would require hundreds of MB in memory (see Music), or for streaming sound from the network
Definition at line 44 of file SoundStream.hpp.
virtual sf::SoundStream::~SoundStream | ( | ) | [virtual] |
Virtual destructor.
sf::SoundStream::SoundStream | ( | ) | [protected] |
Default constructor.
void sf::SoundStream::Play | ( | ) |
void sf::SoundStream::Stop | ( | ) |
unsigned int sf::SoundStream::GetChannelsCount | ( | ) | const |
Return the number of channels (1 = mono, 2 = stereo).
unsigned int sf::SoundStream::GetSampleRate | ( | ) | const |
Get the stream sample rate.
Status sf::SoundStream::GetStatus | ( | ) | const |
Get the status of the stream (stopped, paused, playing).
Reimplemented from sf::Sound.
float sf::SoundStream::GetPlayingOffset | ( | ) | const |
Get the current playing position of the stream.
Reimplemented from sf::Sound.
void sf::SoundStream::SetLoop | ( | bool | Loop | ) |
Set the stream loop state.
This parameter is disabled by default
Loop | : True to play in loop, false to play once |
Reimplemented from sf::Sound.
bool sf::SoundStream::GetLoop | ( | ) | const |
Tell whether or not the stream is looping.
Reimplemented from sf::Sound.
void sf::SoundStream::Initialize | ( | unsigned int | ChannelsCount, | |
unsigned int | SampleRate | |||
) | [protected] |
Set the audio stream parameters, you must call it before Play().
ChannelsCount | : Number of channels | |
SampleRate | : Sample rate |