Garry's Mod Wiki

SoundDuration

  number SoundDuration( string soundName )

Description

Returns the approximate duration of the specified sound in seconds, for .wav and .mp3 sounds.

Arguments

1 string soundName
The sound file path.

Returns

1 number
Sound duration in seconds.