Garry's Mod Wiki

Revision Difference

Global.SoundDuration#562852

<function name="SoundDuration" parent="Global" type="libraryfunc"> <description> Returns the approximate duration of the specified sound in seconds, for `.wav` and `.mp3` sounds. <bug>This function only works on mp3 files if the file is encoded with constant bitrate.</bug>⤶ </description> <realm>Shared</realm> <args> <arg name="soundName" type="string">The sound file path.</arg> </args> <rets> <ret name="" type="number">Sound duration in seconds.</ret> </rets> </function>