Sound:getDuration

Returns the duration of the Sound, in seconds.

duration = Sound:getDuration()

Arguments

None

Returns

NameTypeDescription
durationnumberThe duration of the Sound, in seconds.

Notes

This can be computed as (frameCount / sampleRate).

See also