Garry's Mod Wiki

Revision Difference

Global.SoundDuration#546313

<function name="SoundDuration" parent="Global" type="libraryfunc"> <description> Returns the duration of the specified sound in seconds. <bug issue="936">This function doesn't work proprely on MacOS and Linux.</bug> <bug issue="936">This function does not return the correct duration on MacOS and Linux, or if the file is a non-.wav file on Windows.</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>