Sound

Regular sound that can be played in the audio environment.

Constructors

this
this()

Default constructor.

this
this(const(SoundBuffer) buffer)

Construct the sound with a buffer.

Destructor

~this
~this()

Destructor.

Members

Functions

pause
void pause()

Pause the sound.

play
void play()

Start or resume playing the sound.

stop
void stop()

Stop playing the sound.

Properties

attenuation
float attenuation [@property setter]
float attenuation [@property getter]

The attenuation factor of the sound.

isLooping
bool isLooping [@property setter]
bool isLooping [@property getter]

Whether or not the sound should loop after reaching the end.

minDistance
float minDistance [@property setter]
float minDistance [@property getter]

The minimum distance of the sound.

pitch
float pitch [@property setter]
float pitch [@property getter]

The pitch of the sound.

playingOffset
Duration playingOffset [@property setter]
Duration playingOffset [@property getter]

Change the current playing position (from the beginning) of the sound.

position
Vector3f position [@property setter]
Vector3f position [@property getter]

The 3D position of the sound in the audio scene.

relativeToListener
bool relativeToListener [@property setter]
bool relativeToListener [@property getter]

Make the sound's position relative to the listener (true) or absolute (false).

status
Status status [@property getter]

Get the current status of the sound (stopped, paused, playing).

volume
float volume [@property setter]
float volume [@property getter]

The volume of the sound.

Inherited Members

From SoundSource

Status
enum Status

Enumeration of the sound source states.

pitch
float pitch [@property setter]
float pitch [@property getter]

The pitch of the sound.

volume
float volume [@property setter]
float volume [@property getter]

The volume of the sound.

position
Vector3f position [@property setter]
Vector3f position [@property getter]

The 3D position of the sound in the audio scene.

relativeToListener
bool relativeToListener [@property setter]
bool relativeToListener [@property getter]

Make the sound's position relative to the listener (true) or absolute (false).

minDistance
float minDistance [@property setter]
float minDistance [@property getter]

The minimum distance of the sound.

attenuation
float attenuation [@property setter]
float attenuation [@property getter]

The attenuation factor of the sound.

Meta