SpriteAnimation.lua
Tile.lua
Neo3D.lua
QuadTree.lua
Widget.lua
Sprite.lua
Collision.lua
OEntity.lua
Button.lua
Graphics2D.lua
InputField.lua
LuaUnit.lua
Tests.lua
OCamera.lua
Object3d.lua
class.lua
OLight.lua
SpriteSheet.lua
OSound.lua
Utils.lua
Canvas.lua
Label.lua
Api.lua

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.