|
| Music (std::size_t BufferSize=44100) |
| Construct the music with a buffer size. More...
|
|
| ~Music () |
| Destructor. More...
|
|
bool | OpenFromFile (const std::string &Filename) |
| Open a music file (doesn't play it – call Play() for that) More...
|
|
bool | OpenFromMemory (const char *Data, std::size_t SizeInBytes) |
| Open a music file from memory (doesn't play it – call Play() for that) More...
|
|
float | GetDuration () const |
| Get the music duration. More...
|
|
void | Play () |
| Start playing the audio stream. More...
|
|
void | Stop () |
| Stop playing the audio stream. More...
|
|
unsigned int | GetChannelsCount () const |
| Return the number of channels (1 = mono, 2 = stereo) More...
|
|
unsigned int | GetSampleRate () const |
| Get the stream sample rate. More...
|
|
Status | GetStatus () const |
| Get the status of the stream (stopped, paused, playing) More...
|
|
float | GetPlayingOffset () const |
| Get the current playing position of the stream. More...
|
|
void | SetLoop (bool Loop) |
| Set the stream loop state. More...
|
|
bool | GetLoop () const |
| Tell whether or not the stream is looping. More...
|
|
void | Pause () |
| Pause the sound. 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...
|
|
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...
|
|
Music defines a big sound played using streaming, so usually what we call a music :)
Definition at line 47 of file Music.hpp.
void sf::Sound::SetAttenuation |
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
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.