# Query Sound Duration

Grammar — Query sound duration for info|Sound Link
FlagsNative | Action

Send a network query for the duration of a sound. This will allow the sound duration to be accessed even if the sound duration has not been preloaded. Use “Wait For Sound Durations” to ensure that all results are received before attempting to access the duration value.

# Arguments

  • soundlink — Info

Returns — void

native void SoundLengthQuery(soundlink info);

Category: Sound / Sound Properties

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:32275

    PreloadMovie("Assets\\Textures\\briefing_video_ttychus05_03.ogv", false);
    PreloadSound("LocalizedData\\Sounds\\TerranVO\\CampaignVO\\TTychus05BriefingValerian00004.wav", false);
    SoundLengthQuery(SoundLink("TTychus05BriefingValerian00004", 0));
    PreloadSound("LocalizedData\\Sounds\\TerranVO\\CampaignVO\\TTychus05BriefingTychus00009.wav", false);
    SoundLengthQuery(SoundLink("TTychus05BriefingTychus00009", 0));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:32277

    SoundLengthQuery(SoundLink("TTychus05BriefingValerian00004", 0));
    PreloadSound("LocalizedData\\Sounds\\TerranVO\\CampaignVO\\TTychus05BriefingTychus00009.wav", false);
    SoundLengthQuery(SoundLink("TTychus05BriefingTychus00009", 0));
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:35419

    TriggerSkippableBegin(PlayerGroupAll(), 0, null, true, false);
    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryMusic, "THorner01MusicDebriefB", c_soundtrackCueAny, c_soundtrackIndexAny, false);
    SoundLengthQuery(SoundLink("DebriefsConfederateAdjutant00050", 0));
    SoundLengthQueryWait();
    ConversationDataRegisterUnit("Characters|CharRaynor", gf_ActorUnit(ge_ActorID_ActorRaynor));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:35659

    TriggerSkippableBegin(PlayerGroupAll(), 0, null, true, false);
    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryMusic, "THorner02MusicDebriefB", c_soundtrackCueAny, c_soundtrackIndexAny, false);
    SoundLengthQuery(SoundLink("DebriefsRaynor00002", 0));
    SoundLengthQuery(SoundLink("DebriefsConfederateAdjutant00003", 0));
    SoundLengthQuery(SoundLink("DebriefsDuke00028", 0));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:35660

    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryMusic, "THorner02MusicDebriefB", c_soundtrackCueAny, c_soundtrackIndexAny, false);
    SoundLengthQuery(SoundLink("DebriefsRaynor00002", 0));
    SoundLengthQuery(SoundLink("DebriefsConfederateAdjutant00003", 0));
    SoundLengthQuery(SoundLink("DebriefsDuke00028", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00029", 0));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:35661

    SoundLengthQuery(SoundLink("DebriefsRaynor00002", 0));
    SoundLengthQuery(SoundLink("DebriefsConfederateAdjutant00003", 0));
    SoundLengthQuery(SoundLink("DebriefsDuke00028", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00029", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00030", 0));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:35662

    SoundLengthQuery(SoundLink("DebriefsConfederateAdjutant00003", 0));
    SoundLengthQuery(SoundLink("DebriefsDuke00028", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00029", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00030", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00043", 0));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:35663

    SoundLengthQuery(SoundLink("DebriefsDuke00028", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00029", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00030", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00043", 0));
    SoundLengthQuery(SoundLink("DebriefsRaynor00044", 0));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:35664

    SoundLengthQuery(SoundLink("DebriefsKerrigan00029", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00030", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00043", 0));
    SoundLengthQuery(SoundLink("DebriefsRaynor00044", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00045", 0));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:35665

    SoundLengthQuery(SoundLink("DebriefsArcturus00030", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00043", 0));
    SoundLengthQuery(SoundLink("DebriefsRaynor00044", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00045", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00046", 0));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:32275

    PreloadMovie("Assets\\Textures\\briefing_video_ttychus05_03.ogv", false);
    PreloadSound("LocalizedData\\Sounds\\TerranVO\\CampaignVO\\TTychus05BriefingValerian00004.wav", false);
    SoundLengthQuery(SoundLink("TTychus05BriefingValerian00004", 0));
    PreloadSound("LocalizedData\\Sounds\\TerranVO\\CampaignVO\\TTychus05BriefingTychus00009.wav", false);
    SoundLengthQuery(SoundLink("TTychus05BriefingTychus00009", 0));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:32277

    SoundLengthQuery(SoundLink("TTychus05BriefingValerian00004", 0));
    PreloadSound("LocalizedData\\Sounds\\TerranVO\\CampaignVO\\TTychus05BriefingTychus00009.wav", false);
    SoundLengthQuery(SoundLink("TTychus05BriefingTychus00009", 0));
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:35419

    TriggerSkippableBegin(PlayerGroupAll(), 0, null, true, false);
    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryMusic, "THorner01MusicDebriefB", c_soundtrackCueAny, c_soundtrackIndexAny, false);
    SoundLengthQuery(SoundLink("DebriefsConfederateAdjutant00050", 0));
    SoundLengthQueryWait();
    ConversationDataRegisterUnit("Characters|CharRaynor", gf_ActorUnit(ge_ActorID_ActorRaynor));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:35659

    TriggerSkippableBegin(PlayerGroupAll(), 0, null, true, false);
    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryMusic, "THorner02MusicDebriefB", c_soundtrackCueAny, c_soundtrackIndexAny, false);
    SoundLengthQuery(SoundLink("DebriefsRaynor00002", 0));
    SoundLengthQuery(SoundLink("DebriefsConfederateAdjutant00003", 0));
    SoundLengthQuery(SoundLink("DebriefsDuke00028", 0));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:35660

    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryMusic, "THorner02MusicDebriefB", c_soundtrackCueAny, c_soundtrackIndexAny, false);
    SoundLengthQuery(SoundLink("DebriefsRaynor00002", 0));
    SoundLengthQuery(SoundLink("DebriefsConfederateAdjutant00003", 0));
    SoundLengthQuery(SoundLink("DebriefsDuke00028", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00029", 0));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:35661

    SoundLengthQuery(SoundLink("DebriefsRaynor00002", 0));
    SoundLengthQuery(SoundLink("DebriefsConfederateAdjutant00003", 0));
    SoundLengthQuery(SoundLink("DebriefsDuke00028", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00029", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00030", 0));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:35662

    SoundLengthQuery(SoundLink("DebriefsConfederateAdjutant00003", 0));
    SoundLengthQuery(SoundLink("DebriefsDuke00028", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00029", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00030", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00043", 0));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:35663

    SoundLengthQuery(SoundLink("DebriefsDuke00028", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00029", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00030", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00043", 0));
    SoundLengthQuery(SoundLink("DebriefsRaynor00044", 0));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:35664

    SoundLengthQuery(SoundLink("DebriefsKerrigan00029", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00030", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00043", 0));
    SoundLengthQuery(SoundLink("DebriefsRaynor00044", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00045", 0));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:35665

    SoundLengthQuery(SoundLink("DebriefsArcturus00030", 0));
    SoundLengthQuery(SoundLink("DebriefsKerrigan00043", 0));
    SoundLengthQuery(SoundLink("DebriefsRaynor00044", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00045", 0));
    SoundLengthQuery(SoundLink("DebriefsArcturus00046", 0));

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:13305

        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_BreathLoop", false);
        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_HeartBeatLoop", false);
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_BreathLoop", -1));
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_HeartBeatLoop", -1));
    }

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:13306

        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_HeartBeatLoop", false);
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_BreathLoop", -1));
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_HeartBeatLoop", -1));
    }

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:4271

    else {
    }
    SoundLengthQuery(SoundLink(ConversationDataActiveSound(), c_soundIndexAny));
    if (((ConversationDataActiveSound() == null) || (SoundLengthSync(SoundLink(ConversationDataActiveSound(), c_soundIndexAny)) == 0.0))) {
        lv_lineDuration = 10.0;

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:6645

        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_BreathLoop", false);
        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_HeartBeatLoop", false);
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_BreathLoop", -1));
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_HeartBeatLoop", -1));
    }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:6646

        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_HeartBeatLoop", false);
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_BreathLoop", -1));
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_HeartBeatLoop", -1));
    }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:3476

    }

    SoundLengthQuery(SoundLink(ConversationDataActiveSound(), c_soundIndexAny));
    if (((ConversationDataActiveSound() == null) || (SoundLengthSync(SoundLink(ConversationDataActiveSound(), c_soundIndexAny)) == 0.0))) {
        lv_lineDuration = 10.0;

mods/heroesmapmods/battlegroundmapmods/hauntedmines.stormmodbase.stormdata/LibMHtM.galaxy:148

    }

    SoundLengthQuery(SoundLink("Event_Mines_Boss_Summon_Start", -1));
    return true;
}

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:2978

    }

    SoundLengthQuery(SoundLink(ConversationDataActiveSound(), c_soundIndexAny));
    if (((ConversationDataActiveSound() == null) || (SoundLengthSync(SoundLink(ConversationDataActiveSound(), c_soundIndexAny)) == 0.0))) {
        lv_lineDuration = 10.0;

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNovC.galaxy:2316

        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_BreathLoop", false);
        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_HeartBeatLoop", false);
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_BreathLoop", -1));
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_HeartBeatLoop", -1));
    }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNovC.galaxy:2317

        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_HeartBeatLoop", false);
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_BreathLoop", -1));
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_HeartBeatLoop", -1));
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:4450

        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_BreathLoop", false);
        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_HeartBeatLoop", false);
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_BreathLoop", -1));
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_HeartBeatLoop", -1));
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:4451

        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_HeartBeatLoop", false);
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_BreathLoop", -1));
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_HeartBeatLoop", -1));
    }

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:6414

        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_BreathLoop", false);
        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_HeartBeatLoop", false);
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_BreathLoop", -1));
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_HeartBeatLoop", -1));
    }

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:6415

        libNtve_gf_PreloadSoundObject("UI_LowHealthWarning_HeartBeatLoop", false);
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_BreathLoop", -1));
        SoundLengthQuery(SoundLink("UI_LowHealthWarning_HeartBeatLoop", -1));
    }