Sound:getDuration

Edit

Returns the duration of the Sound, in seconds.

duration = Sound:getDuration()

Arguments

None

Returns

NameTypeDescription
durationnumber The duration of the Sound, in seconds.

Notes

This can be computed as (frameCount / sampleRate).

See also