#include <Sound.hpp>
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) | |
void | Play () |
void | Pause () |
void | Stop () |
void | SetBuffer (const sfSoundBuffer *Buffer) |
void | SetLoop (bool Loop) |
void | SetPitch (float Pitch) |
void | SetVolume (float Volume) |
void | SetPosition (float X, float Y, float Z) |
const sfSoundBuffer * | GetBuffer () const |
bool | GetLoop () const |
float | GetPitch () const |
float | GetVolume () const |
void | GetPosition (float &X, float &Y, float &Z) const |
sfSoundStatus | GetStatus () const |
float | GetPlayingOffset () const |
Definition at line 43 of file Sound.hpp.
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) |
Definition at line 36 of file Sound.cpp.
References SetBuffer().
void sfSound::SetBuffer | ( | const sfSoundBuffer * | Buffer | ) |
Set the source buffer
Buffer | : Pointer to the new sound buffer to bind to the sound |
Definition at line 86 of file Sound.cpp.
References sfSoundBuffer::GetId().
Referenced by sfSound().
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 |
sfSoundStatus sfSound::GetStatus | ( | ) | const |
float sfSound::GetPlayingOffset | ( | ) | const |