The OSound class
An 'OSound' instance is a sound object in a scene which can be
used to play 3D and 2D sounds and music during runtime.
See also: Widget
OSound(file)
Creates a new sound object and loads the specified file.
Parameter
file
A string containing the path to a sound file.
function OSound:setGain(g)
Sets sound gain.
Parameter
g
The new sound gain as a number.
function OSound:setLooping(looping)
Sets if the sound should repeat in a loop.
Parameter
looping
A boolean.
function OSound:play()
Plays the sound one time or until stopped or paused
if the sound is configure to loop.
function OSound:pause()
Pauses the sound so it can be resumed later at the same
point.
function OSound:stop()
Stops the sound.