API Reference › Audio › Audio.stop
method

Audio.stop

Audio.stop(id) -> void

Stops the sound id and rewinds it to the start. If it was the current music, the music channel is cleared.

Example

program Demo {
  entry {
    let sfx = Audio.load("blip.wav")
    Audio.play(sfx)
    Audio.stop(sfx)
  }
}
← All symbols