Class: sound

sound resources

Hierarchy

o-+ resource
  o-+ sound

Methods:

Method overview:


defaultpath ([string])
returns: ([string])
returns or sets the default resource path. Luxinia will search in those when resources are not found.
devices ()
returns: (string ...)
returns available sound devices
getdevicename ()
returns: (string name)
returns the name of the current device
getrestype ()
returns: (int restype)
returns the resource type as int value, useful for resdata or reschunk functions
load (string filename)
returns: (Sound snd)
adds a soundfile to loaded resources
monocount ()
returns: (int n)
returns the maximum for mono sources for the current device
play (Sound snd)
returns: (boolean)
plays a soundfile. Returns true if it plays the sound.
setdevice ([string devicename])
returns: (string device)
Trys to set the sounddevice according to a device with the given name or the default device if nil or no string is passed. If it fails, it will try to select the default device. Returns the selected device. Setting the current device will make all soundnodes invalid, which may result in a runtime error in lua when old (invalid) soundnodes are reused.
stereocount ()
returns: (int n)
returns the maximum for stereo sources for the current device

Inherited Methods:

From resource

condition, getresname, getresshortname, resuserstring