Garry's Mod Wiki

Revision Difference

Global.SoundDuration#562075

<function name="SoundDuration" parent="Global" type="libraryfunc"> <description> Returns the duration of the specified sound in seconds. <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>⤶ <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.⤶ This is fixed in the next update.</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>