Sound:stop([delay]) method
Plays the sound, from its current cursor position
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
local audio = require "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