stop

fun stop(when: Double = definedExternally)(source)

The stop() method on AudioScheduledSourceNode schedules a sound to cease playback at the specified time. If no time is specified, then the sound stops playing immediately.

MDN Reference