307 unsigned int mySource;
AudioResource()
Default constructor.
Safe pointer to a T resource (inheriting from sf::Resource<T>), its pointer is automatically reseted ...
SoundBuffer is the low-level for loading and manipulating sound buffers.
float GetPlayingOffset() const
Get the current playing position of the sound.
void SetMinDistance(float MinDistance)
Set the minimum distance - closer than this distance, the listener will hear the sound at its maximum...
void SetPosition(const Vector3f &Position)
Set the sound position (take a 3D vector).
void ResetBuffer()
Reset the internal buffer.
void SetVolume(float Volume)
Set the sound volume.
const SoundBuffer * GetBuffer() const
Get the source buffer.
bool GetLoop() const
Tell whether or not the sound is looping.
Status
Enumeration of the sound states.
@ Playing
Sound is playing.
@ Stopped
Sound is not playing.
bool IsRelativeToListener() const
Tell if the sound's position is relative to the listener's position, or if it's absolute.
Sound()
Default constructor.
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.
void SetLoop(bool Loop)
Set the sound loop state.
float GetVolume() const
Get the volume.
void Pause()
Pause the sound.
float GetAttenuation() const
Get the attenuation factor.
void SetRelativeToListener(bool Relative)
Make the sound's position relative to the listener's position, or absolute.
Vector3f GetPosition() const
Get the sound position.
void SetBuffer(const SoundBuffer &Buffer)
Set the source buffer.
Sound(const Sound &Copy)
Copy constructor.
void Stop()
Stop the sound.
void SetPosition(float X, float Y, float Z)
Set the sound position (take 3 values).
float GetPitch() const
Get the pitch.
Status GetStatus() const
Get the status of the sound (stopped, paused, playing).
void SetAttenuation(float Attenuation)
Set the attenuation factor - the higher the attenuation, the more the sound will be attenuated with d...
float GetMinDistance() const
Get the minimum distance.
void SetPlayingOffset(float TimeOffset)
Set the current playing position of the sound.
void SetPitch(float Pitch)
Set the sound pitch.
void Play()
Play the sound.
Vector3< float > Vector3f