Documentation

Audio::Voice

Class

Represents a currently playing voice of audio.

Methods

bool IsPaused()
Returns bool
double GetPosition()

Gets the current position within the sample in seconds.

Returns double
void SetPosition(double pos)

Sets the current position within the sample in seconds. Note that this is not an immediate action because voice mixing is performed in a different thread. (GetPosition() will not immediately return the same value as you pass here.)

double GetLength()

Gets the length of the sample in seconds. Note that on streamed samples, this may be expensive on the first call as it may have to decode the entire stream.

Returns double
float GetGain()
Returns float