|
| | Music (std::size_t BufferSize=44100) |
| | Construct the music with a buffer size.
|
| | ~Music () |
| | Destructor.
|
| bool | OpenFromFile (const std::string &Filename) |
| | Open a music file (doesn't play it – call Play() for that).
|
| bool | OpenFromMemory (const char *Data, std::size_t SizeInBytes) |
| | Open a music file from memory (doesn't play it – call Play() for that).
|
| float | GetDuration () const |
| | Get the music duration.
|
| void | Play () |
| | Start playing the audio stream.
|
| void | Stop () |
| | Stop playing the audio stream.
|
| unsigned int | GetChannelsCount () const |
| | Return the number of channels (1 = mono, 2 = stereo).
|
| unsigned int | GetSampleRate () const |
| | Get the stream sample rate.
|
| Status | GetStatus () const |
| | Get the status of the stream (stopped, paused, playing).
|
| float | GetPlayingOffset () const |
| | Get the current playing position of the stream.
|
| void | SetLoop (bool Loop) |
| | Set the stream loop state.
|
| bool | GetLoop () const |
| | Tell whether or not the stream is looping.
|
| void | Pause () |
| | Pause the sound.
|
| 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 (take 3 values).
|
| void | SetPosition (const Vector3f &Position) |
| | Set the sound position (take a 3D vector).
|
| void | SetRelativeToListener (bool Relative) |
| | Make the sound's position relative to the listener's position, or absolute.
|
| void | SetMinDistance (float MinDistance) |
| | Set the minimum distance - closer than this distance, the listener will hear the sound at its maximum volume.
|
| void | SetAttenuation (float Attenuation) |
| | Set the attenuation factor - the higher the attenuation, the more the sound will be attenuated with distance from listener.
|
| float | GetPitch () const |
| | Get the pitch.
|
| float | GetVolume () const |
| | Get the volume.
|
| Vector3f | GetPosition () const |
| | Get the sound position.
|
| bool | IsRelativeToListener () const |
| | Tell if the sound's position is relative to the listener's position, or if it's absolute.
|
| float | GetMinDistance () const |
| | Get the minimum distance.
|
| float | GetAttenuation () const |
| | Get the attenuation factor.
|
Music defines a big sound played using streaming, so usually what we call a music :).
Definition at line 47 of file Music.hpp.
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 160 of file Sound.cpp.
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 151 of file Sound.cpp.