GetTransmissionDuration
- Parameters
soundHandle soundtimeType integertimeVal real- comment
- patch
1.00
- Source
- Blizzard.j (suggest an edit or discuss on Github)
- return type
real- Source code
function GetTransmissionDuration takes sound soundHandle, integer timeType, real timeVal returns real local real duration if (timeType == bj_TIMETYPE_ADD) then set duration = GetSoundDurationBJ(soundHandle) + timeVal elseif (timeType == bj_TIMETYPE_SET) then set duration = timeVal elseif (timeType == bj_TIMETYPE_SUB) then set duration = GetSoundDurationBJ(soundHandle) - timeVal else // Unrecognized timeType - ignore timeVal. set duration = GetSoundDurationBJ(soundHandle) endif // Make sure we have a non-negative duration. if (duration < 0) then set duration = 0 endif return duration endfunction