sfSoundStream Class Reference

#include <SoundStream.hpp>

Inheritance diagram for sfSoundStream:

sfMusic List of all members.

Public Member Functions

virtual ~sfSoundStream ()
void Play ()
void Pause ()
void Stop ()
unsigned int GetFrequency () const
unsigned int GetChannelsCount () const
void SetPitch (float Pitch)
void SetVolume (float Volume)
void SetPosition (float X, float Y, float Z)
float GetPitch () const
float GetVolume () const
void GetPosition (float &X, float &Y, float &Z) const
sfSoundStatus GetStatus () const

Protected Member Functions

 sfSoundStream ()
void Initialize (unsigned int ChannelsCount, unsigned int Frequency)

Classes

struct  Chunk

Detailed Description

sfSoundStream 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 43 of file SoundStream.hpp.


Constructor & Destructor Documentation

sfSoundStream::~sfSoundStream (  )  [virtual]

Virtual destructor

Definition at line 49 of file SoundStream.cpp.

References Stop().

sfSoundStream::sfSoundStream (  )  [protected]

Default constructor

Definition at line 37 of file SoundStream.cpp.


Member Function Documentation

void sfSoundStream::Play (  ) 

Start playing the audio stream

Definition at line 69 of file SoundStream.cpp.

void sfSoundStream::Pause (  ) 

Pause the audio stream

Definition at line 102 of file SoundStream.cpp.

void sfSoundStream::Stop (  ) 

Stop playing the audio stream

Definition at line 111 of file SoundStream.cpp.

Referenced by ~sfSoundStream().

unsigned int sfSoundStream::GetFrequency (  )  const

Get the stream frequency

Returns:
Stream frequency (number of samples per second)

Definition at line 131 of file SoundStream.cpp.

unsigned int sfSoundStream::GetChannelsCount (  )  const

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

Returns:
Number of channels

Definition at line 122 of file SoundStream.cpp.

void sfSoundStream::SetPitch ( float  Pitch  ) 

Set the stream pitch

Parameters:
Pitch : New pitch

Definition at line 140 of file SoundStream.cpp.

void sfSoundStream::SetVolume ( float  Volume  ) 

Set the stream volume

Parameters:
Volume : Volume (in range [0, 100])

Definition at line 149 of file SoundStream.cpp.

void sfSoundStream::SetPosition ( float  X,
float  Y,
float  Z 
)

Set the stream position

Parameters:
X : X position of the sound in the world
Y : Y position of the sound in the world
Z : Z position of the sound in the world

Definition at line 158 of file SoundStream.cpp.

float sfSoundStream::GetPitch (  )  const

Get the pitch

Returns:
Pitch value

Definition at line 167 of file SoundStream.cpp.

float sfSoundStream::GetVolume (  )  const

Get the volume

Returns:
Volume value (in range [1, 100])

Definition at line 179 of file SoundStream.cpp.

void sfSoundStream::GetPosition ( float &  X,
float &  Y,
float &  Z 
) const

Get the stream position

Parameters:
X : X position of the sound in the world
Y : Y position of the sound in the world
Z : Z position of the sound in the world

Definition at line 191 of file SoundStream.cpp.

sfSoundStatus sfSoundStream::GetStatus (  )  const

Get the status of the stream (stopped, paused, playing)

Returns:
Current status of the sound

Definition at line 200 of file SoundStream.cpp.

void sfSoundStream::Initialize ( unsigned int  ChannelsCount,
unsigned int  Frequency 
) [protected]

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

Parameters:
ChannelsCount : Number of channels
Frequency : Sample rate

Definition at line 59 of file SoundStream.cpp.

Referenced by sfMusic::Open().


The documentation for this class was generated from the following files:
Generated for SFML by  doxygen 1.5.2