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