Function rate

  • get or set the rate of playback for a sound.

    Parameters

    • sound_name: string

      audio clip name - case sensitive

    • Rest...args: any[]

    Returns number

    return the current playback rate (if no extra parameters were given)

    // get the playback rate of the background music
    let rate = me.audio.rate("dst-gameforest");
    // speed up the playback of the background music
    me.audio.rate("dst-gameforest", 2.0);