Garry's Mod Wiki

Revision Difference

Global.SoundDuration#528525

<function name="SoundDuration" parent="Global" type="libraryfunc"> <description> Returns the duration of the sound specified in seconds. <bug issue="936">This only works properly on Windows for .wav files.</bug> Returns the duration of the specified sound in seconds. <bug issue="936">On Linux and MacOS, this function will report .wav files as being 0 seconds long.</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>