Sound:play([delay]) method


Plays the sound, from its current cursor position

Parameters

[delay]

A number representing an optional delay before the sound is played, in milliseconds (defaulting to 0)

Return value

This function returns no value.

Example

local audio = require "audio" local console = require "console" -- loads a explosion sound local sound = audio.Sound("boom.wav") sound:play(1000) -- Start the audio from 1000ms sys.sleep((sound.duration+0.8)*1000) console.writecolor("red", "BOOOUUUM !!!\n")