sf::SoundStream Class Reference

SoundStream is a streamed sound, ie samples are acquired while the sound is playing. More...

#include <SoundStream.hpp>

Inheritance diagram for sf::SoundStream:

sf::Thread sf::Sound sf::Music List of all members.

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 sound frequency (sample rate).
Status GetStatus () const
 Get the status of the sound (stopped, paused, playing).

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...

Detailed Description

SoundStream is a streamed sound, ie samples are acquired while the sound is playing.

Use it for big sounds that would require hundreds of MB in memory (see sfMusic), or for streaming sound from the network

Definition at line 44 of file SoundStream.hpp.


Constructor & Destructor Documentation

sf::SoundStream::~SoundStream (  )  [virtual]

Virtual destructor.

Definition at line 53 of file SoundStream.cpp.

sf::SoundStream::SoundStream (  )  [protected]

Default constructor.

Definition at line 40 of file SoundStream.cpp.


Member Function Documentation

void sf::SoundStream::Play (  ) 

Start playing the audio stream.

Reimplemented from sf::Sound.

Definition at line 84 of file SoundStream.cpp.

void sf::SoundStream::Stop (  ) 

Stop playing the audio stream.

Reimplemented from sf::Sound.

Definition at line 113 of file SoundStream.cpp.

unsigned int sf::SoundStream::GetChannelsCount (  )  const

Return the number of channels (1 = mono, 2 = stereo, .

..)

Returns:
Number of channels

Definition at line 124 of file SoundStream.cpp.

unsigned int sf::SoundStream::GetSampleRate (  )  const

Get the sound frequency (sample rate).

Returns:
Stream frequency (number of samples per second)

Definition at line 133 of file SoundStream.cpp.

Sound::Status sf::SoundStream::GetStatus (  )  const

Get the status of the sound (stopped, paused, playing).

Returns:
Current status of the sound

Reimplemented from sf::Sound.

Definition at line 142 of file SoundStream.cpp.

void sf::SoundStream::Initialize ( unsigned int  ChannelsCount,
unsigned int  SampleRate 
) [protected]

Set the audio stream parameters, you must call it before Play().

Parameters:
ChannelsCount : Number of channels
SampleRate : Sample rate

Definition at line 63 of file SoundStream.cpp.


The documentation for this class was generated from the following files: