#include <Sound.hpp>
Inheritance diagram for sfSound:
Public Types | |
enum | Status { Stopped, Paused, Playing } |
Enumeration of the sound states. More... | |
Public Member Functions | |
sfSound (const sfSoundBuffer *Buffer=NULL, bool Loop=false, float Pitch=1.f, float Volume=100.f, float X=0.f, float Y=0.f, float Z=0.f) | |
Construct the sound from its parameters. | |
sfSound (const sfSound &Copy) | |
Copy constructor. | |
~sfSound () | |
Destructor. | |
void | Play () |
Play the sound. | |
void | Pause () |
Pause the sound. | |
void | Stop () |
Stop the sound. | |
void | SetBuffer (const sfSoundBuffer *Buffer) |
Set the source buffer. | |
void | SetLoop (bool Loop) |
Set the sound loop state. | |
void | SetPitch (float Pitch) |
Set the sound pitch. | |
void | SetVolume (float Volume) |
Set the sound volume. | |
void | SetPosition (float X, float Y, float Z) |
Set the sound position. | |
const sfSoundBuffer * | GetBuffer () const |
Get the source buffer. | |
bool | GetLoop () const |
Tell whether or not the sound is looping. | |
float | GetPitch () const |
Get the pitch. | |
float | GetVolume () const |
Get the volume. | |
void | GetPosition (float &X, float &Y, float &Z) const |
Get the sound position. | |
Status | GetStatus () const |
Get the status of the sound (stopped, paused, playing). | |
float | GetPlayingOffset () const |
Get the current playing position of the sound. | |
sfSound & | operator= (const sfSound &Other) |
Assignment operator. | |
Friends | |
class | sfSoundStream |
Definition at line 41 of file Sound.hpp.
enum sfSound::Status |
sfSound::sfSound | ( | const sfSoundBuffer * | Buffer = NULL , |
|
bool | Loop = false , |
|||
float | Pitch = 1.f , |
|||
float | Volume = 100.f , |
|||
float | X = 0.f , |
|||
float | Y = 0.f , |
|||
float | Z = 0.f | |||
) |
Construct the sound from its parameters.
Buffer | : Sound buffer to play (NULL by default) | |
Loop | : Loop flag (false by default) | |
Pitch | : Value of the pitch (1 by default) | |
Volume | : Volume (100 by default) | |
X | : X position (0 by default) | |
Y | : Y position (0 by default) | |
Z | : Z position (0 by default) |
sfSound::sfSound | ( | const sfSound & | Copy | ) |
void sfSound::Play | ( | ) |
void sfSound::Stop | ( | ) |
void sfSound::SetBuffer | ( | const sfSoundBuffer * | Buffer | ) |
void sfSound::SetLoop | ( | bool | Loop | ) |
void sfSound::SetPitch | ( | float | Pitch | ) |
void sfSound::SetVolume | ( | float | Volume | ) |
void sfSound::SetPosition | ( | float | X, | |
float | Y, | |||
float | Z | |||
) |
const sfSoundBuffer * sfSound::GetBuffer | ( | ) | const |
bool sfSound::GetLoop | ( | ) | const |
float sfSound::GetPitch | ( | ) | const |
float sfSound::GetVolume | ( | ) | const |
void sfSound::GetPosition | ( | float & | X, | |
float & | Y, | |||
float & | Z | |||
) | const |
sfSound::Status sfSound::GetStatus | ( | ) | const |
Get the status of the sound (stopped, paused, playing).
Reimplemented in sfSoundStream.
float sfSound::GetPlayingOffset | ( | ) | const |