25 #ifndef SFML_SOUNDSOURCE_HPP
26 #define SFML_SOUNDSOURCE_HPP
31 #include <SFML/Audio/Export.hpp>
32 #include <SFML/Audio/AlResource.hpp>
33 #include <SFML/System/Vector3.hpp>
315 #endif // SFML_SOUNDSOURCE_HPP
void setMinDistance(float distance)
Set the minimum distance of the sound.
bool isRelativeToListener() const
Tell whether the sound's position is relative to the listener or is absolute.
void setPosition(float x, float y, float z)
Set the 3D position of the sound in the audio scene.
float getAttenuation() const
Get the attenuation factor of the sound.
void setPitch(float pitch)
Set the pitch of the sound.
float getPitch() const
Get the pitch of the sound.
void setVolume(float volume)
Set the volume of the sound.
SoundSource(const SoundSource ©)
Copy constructor.
Vector3f getPosition() const
Get the 3D position of the sound in the audio scene.
virtual void play()=0
Start or resume playing the sound source.
unsigned int m_source
OpenAL source identifier.
Base class defining a sound's properties.
float getVolume() const
Get the volume of the sound.
Base class for classes that require an OpenAL context.
void setRelativeToListener(bool relative)
Make the sound's position relative to the listener or absolute.
SoundSource()
Default constructor.
void setAttenuation(float attenuation)
Set the attenuation factor of the sound.
virtual void pause()=0
Pause the sound source.
virtual Status getStatus() const
Get the current status of the sound (stopped, paused, playing)
virtual ~SoundSource()
Destructor.
virtual void stop()=0
Stop playing the sound source.
@ Stopped
Sound is not playing.
float getMinDistance() const
Get the minimum distance of the sound.
Utility template class for manipulating 3-dimensional vectors.
void setPosition(const Vector3f &position)
Set the 3D position of the sound in the audio scene.
Status
Enumeration of the sound source states.