SoundStream

Abstract base class for streamed audio sources.

Constructors

this
this()

Internal constructor required to set up callbacks.

Destructor

~this
~this()

Destructor.

Members

Functions

initialize
void initialize(uint channelCount, uint sampleRate)

Define the audio stream parameters.

onGetData
bool onGetData(ref const(short)[] samples)

Request a new chunk of audio samples from the stream source.

onSeek
void onSeek(Duration timeOffset)

Change the current playing position in the stream source.

pause
void pause()

Pause the audio stream.

play
void play()

Start or resume playing the audio stream.

stop
void stop()

Stop playing the audio stream.

Properties

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

The attenuation factor of the sound.

channelCount
uint channelCount [@property getter]

The number of channels of the stream.

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

Whether or not the stream 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]

The current playing position (from the beginning) of the stream.

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).

sampleRate
uint sampleRate [@property getter]

The stream sample rate of the stream

status
Status status [@property getter]

The current status of the stream (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