|
| Sound () |
| Default constructor. More...
|
|
| Sound (const SoundBuffer &Buffer, bool Loop=false, float Pitch=1.f, float Volume=100.f, const Vector3f &Position=Vector3f(0, 0, 0)) |
| Construct the sound from its parameters. More...
|
|
| Sound (const Sound &Copy) |
| Copy constructor. More...
|
|
| ~Sound () |
| Destructor. More...
|
|
void | Play () |
| Play the sound. More...
|
|
void | Pause () |
| Pause the sound. More...
|
|
void | Stop () |
| Stop the sound. More...
|
|
void | SetBuffer (const SoundBuffer &Buffer) |
| Set the source buffer. More...
|
|
void | SetLoop (bool Loop) |
| Set the sound loop state. More...
|
|
void | SetPitch (float Pitch) |
| Set the sound pitch. More...
|
|
void | SetVolume (float Volume) |
| Set the sound volume. More...
|
|
void | SetPosition (float X, float Y, float Z) |
| Set the sound position (take 3 values). More...
|
|
void | SetPosition (const Vector3f &Position) |
| Set the sound position (take a 3D vector). More...
|
|
void | SetRelativeToListener (bool Relative) |
| Make the sound's position relative to the listener's position, or absolute. More...
|
|
void | SetMinDistance (float MinDistance) |
| Set the minimum distance - closer than this distance, the listener will hear the sound at its maximum volume. More...
|
|
void | SetAttenuation (float Attenuation) |
| Set the attenuation factor - the higher the attenuation, the more the sound will be attenuated with distance from listener. More...
|
|
void | SetPlayingOffset (float TimeOffset) |
| Set the current playing position of the sound. More...
|
|
const SoundBuffer * | GetBuffer () const |
| Get the source buffer. More...
|
|
bool | GetLoop () const |
| Tell whether or not the sound is looping. More...
|
|
float | GetPitch () const |
| Get the pitch. More...
|
|
float | GetVolume () const |
| Get the volume. More...
|
|
Vector3f | GetPosition () const |
| Get the sound position. More...
|
|
bool | IsRelativeToListener () const |
| Tell if the sound's position is relative to the listener's position, or if it's absolute. More...
|
|
float | GetMinDistance () const |
| Get the minimum distance. More...
|
|
float | GetAttenuation () const |
| Get the attenuation factor. More...
|
|
Status | GetStatus () const |
| Get the status of the sound (stopped, paused, playing) More...
|
|
float | GetPlayingOffset () const |
| Get the current playing position of the sound. More...
|
|
Sound & | operator= (const Sound &Other) |
| Assignment operator. More...
|
|
void | ResetBuffer () |
| Reset the internal buffer. More...
|
|
Sound defines the properties of a sound such as position, volume, pitch, etc.
Definition at line 45 of file Sound.hpp.
void sf::Sound::SetAttenuation |
( |
float |
Attenuation | ) |
|
Set the attenuation factor - the higher the attenuation, the more the sound will be attenuated with distance from listener.
The default attenuation factor 1.0
- Parameters
-
Attenuation | : New attenuation factor for the sound |
The default attenuation factor 1.0
Definition at line 219 of file Sound.cpp.
void sf::Sound::SetMinDistance |
( |
float |
MinDistance | ) |
|
Set the minimum distance - closer than this distance, the listener will hear the sound at its maximum volume.
The default minimum distance is 1.0
- Parameters
-
MinDistance | : New minimum distance for the sound |
The default minimum distance is 1.0
Definition at line 208 of file Sound.cpp.
void sf::Sound::SetPosition |
( |
float |
X, |
|
|
float |
Y, |
|
|
float |
Z |
|
) |
| |
Set the sound position (take 3 values).
The default position is (0, 0, 0)
- Parameters
-
X,Y,Z | : Position of the sound in the world |
The default position is (0, 0, 0)
Definition at line 176 of file Sound.cpp.
void sf::Sound::SetPosition |
( |
const Vector3f & |
Position | ) |
|
Set the sound position (take a 3D vector).
The default position is (0, 0, 0)
- Parameters
-
Position | : Position of the sound in the world |
The default position is (0, 0, 0)
Definition at line 186 of file Sound.cpp.
void sf::Sound::SetRelativeToListener |
( |
bool |
Relative | ) |
|
Make the sound's position relative to the listener's position, or absolute.
The default value is false (absolute)
- Parameters
-
Relative | : True to set the position relative, false to set it absolute |
The default value is false (absolute)
Definition at line 197 of file Sound.cpp.