Sound:stop([delay])method
Stops the sound, optionally after a delay.
Parameters
[delay]
A number representing an optional delay before the sound is stopped, in milliseconds (defaulting to 0)
Return value
This function returns no value.Example
--! luart-extensions
import audio
local console = require "console"
-- Loads and play a music
local sound = audio.Sound("music.mp3")
sound:play()
-- will stop the sound in one minute (= 60000ms)
sound:stop(60000)
while sound.playing do
sleep()
end