File.loadSound

From MiniScript Wiki
Revision as of 19:22, 5 August 2021 by JoeStrout (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The file.loadSound loads a sound file from disk, returning a Sound object. The file may be in either WAV or OGG format.

Example

snd = file.loadSound("/sys/sounds/bonus.wav")
snd.play