155 void(
const float* inputFrames,
unsigned int& inputFrameCount,
float* outputFrames,
unsigned int& outputFrameCount,
unsigned int frameChannelCount)>;
665 [[nodiscard]] virtual
void* getSound() const = 0;
Represents an angle value.
AudioResource(const AudioResource &)=default
Copy constructor.
float getVolume() const
Get the volume of the sound.
virtual void stop()=0
Stop playing the sound source.
float getMinGain() const
Get the minimum gain of the sound.
float getPan() const
Get the pan of the sound.
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 setDopplerFactor(float factor)
Set the doppler factor of the sound.
Vector3f getDirection() const
Get the 3D direction of the sound in the audio scene.
void setVolume(float volume)
Set the volume of the sound.
void setVelocity(const Vector3f &velocity)
Set the 3D velocity of the sound in the audio scene.
float getMaxDistance() const
Get the maximum distance of the sound.
float getPitch() const
Get the pitch of the sound.
void setMaxDistance(float distance)
Set the maximum distance of the sound.
SoundSource(SoundSource &&) noexcept=default
Move constructor.
float getMinDistance() const
Get the minimum distance of the sound.
void setSpatializationEnabled(bool enabled)
Set whether spatialization of the sound is enabled.
SoundSource(const SoundSource &)=default
Copy constructor.
virtual void play()=0
Start or resume playing the sound source.
float getMaxGain() const
Get the maximum gain of the sound.
void setPitch(float pitch)
Set the pitch of the sound.
void setMinDistance(float distance)
Set the minimum distance of the sound.
bool isSpatializationEnabled() const
Tell whether spatialization of the sound is enabled.
float getAttenuation() const
Get the attenuation factor of the sound.
Vector3f getPosition() const
Get the 3D position of the sound in the audio scene.
virtual void setEffectProcessor(EffectProcessor effectProcessor)
Set the effect processor to be applied to the sound.
Vector3f getVelocity() const
Get the 3D velocity of the sound in the audio scene.
float getDirectionalAttenuationFactor() const
Get the directional attenuation factor of the sound.
void setAttenuation(float attenuation)
Set the attenuation factor of the sound.
void setMaxGain(float gain)
Set the maximum gain of the sound.
std::function< void(const float *inputFrames, unsigned int &inputFrameCount, float *outputFrames, unsigned int &outputFrameCount, unsigned int frameChannelCount)> EffectProcessor
Callable that is provided with sound data for processing.
virtual Status getStatus() const =0
Get the current status of the sound (stopped, paused, playing)
void setCone(const Cone &cone)
Set the cone properties of the sound in the audio scene.
Status
Enumeration of the sound source states.
@ Stopped
Sound is not playing.
@ Playing
Sound is playing.
void setDirection(const Vector3f &direction)
Set the 3D direction of the sound in the audio scene.
void setRelativeToListener(bool relative)
Make the sound's position relative to the listener or absolute.
void setPan(float pan)
Set the pan of the sound.
bool isRelativeToListener() const
Tell whether the sound's position is relative to the listener or is absolute.
Cone getCone() const
Get the cone properties of the sound in the audio scene.
void setMinGain(float gain)
Set the minimum gain of the sound.
void setDirectionalAttenuationFactor(float factor)
Set the directional attenuation factor of the sound.
float getDopplerFactor() const
Get the doppler factor of the sound.
Vector3< float > Vector3f
Structure defining the properties of a directional cone.
float outerGain
Outer gain.
Angle innerAngle
Inner angle.
Angle outerAngle
Outer angle.