GetSoundFileDuration

Parameters
musicFileName string
async
This function is asynchronous. The values it returns are not guaranteed to be the same for each player. If you attempt to use it in an synchronous manner it may cause a desync.
comment

Returns length of the sound file under the path in milliseconds.

note

Beweare that this might return different values for different players if you use native wc3-sounds as these can have different length in different languages. This can cause desyncs if you use the duration for non-local stuff.

return type
integer
Source code
native GetSoundFileDuration         takes string musicFileName returns integer
Source
sound.j
wc3modding.com
GetSoundFileDuration