28#include <SFML/Audio/Sound.hpp>
29#include <SFML/Audio/SoundBuffer.hpp>
30#include <SFML/Audio/OpenAL.hpp>
93 myBuffer->DetachSound(
this);
136 myBuffer->DetachSound(
this);
141 myBuffer->AttachSound(
this);
372 myBuffer->DetachSound(
this);
Abstract base class for every class that owns a device-dependant resource – allow them to initialize ...
SoundBuffer is the low-level for loading and manipulating sound buffers.
Sound defines the properties of a sound such as position, volume, pitch, etc.
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 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.
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.
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.
Sound & operator=(const Sound &Other)
Assignment operator.
void SetAttenuation(float Attenuation)
Set the attenuation factor - the higher the attenuation, the more the sound will be attenuated with d...
Status GetStatus() const
Get the status of the sound (stopped, paused, playing)
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.
Vector2 is an utility class for manipulating 2 dimensional vectors.
Vector3 is an utility class for manipulating 3 dimensional vectors.
T z
Z coordinate of the vector.
T x
X coordinate of the vector.
T y
Y coordinate of the vector.