CorsixTH Lua Documentation

Audio Class

Layer which handles the Lua-facing side of loading and playing audio.

Declared on: line 29 of Lua/audio.lua.

Method Index

Member Index

function Audio:Audio(app)

Parameters:

NameTypeDescription
app ? ?

Declared on: line 32 of Lua/audio.lua.

function Audio:dumpSoundArchive(out_dir)

Parameters:

NameTypeDescription
out_dir ? ?

Declared on: line 232 of Lua/audio.lua.

function Audio:initSpeech(speech_file)

Parameters:

NameTypeDescription
speech_file ? ?

Declared on: line 177 of Lua/audio.lua.

function Audio:notifyJukebox()

search for jukebox and notify it to update its play button

Declared on: line 512 of Lua/audio.lua.

function Audio:pauseBackgroundTrack()

Returns whether music is currently paused or not after the call.

If nil is returned music might either be playing or completely stopped.

Declared on: line 362 of Lua/audio.lua.

function Audio:playBackgroundTrack(index)

Plays a given background track.

Playback will only start if the configuration says it's ok. (play_music = true)

Parameters:

NameTypeDescription
index ? Index of the track to play in the playlist.

Declared on: line 420 of Lua/audio.lua.

function Audio:playNextOrPreviousBackgroundTrack(direction)

Parameters:

NameTypeDescription
direction ? ?

Declared on: line 332 of Lua/audio.lua.

function Audio:playSound(name, where, is_announcement)

Parameters:

NameTypeDescription
name ? ?
where ? ?
is_announcement ? ?

Declared on: line 255 of Lua/audio.lua.

function Audio:playSoundEffects(play_effects)

Parameters:

NameTypeDescription
play_effects ? ?

Declared on: line 500 of Lua/audio.lua.

function Audio:releaseChannel(channel)

Parameters:

NameTypeDescription
channel ? ?

Declared on: line 528 of Lua/audio.lua.

function Audio:setAnnouncementVolume(volume)

Parameters:

NameTypeDescription
volume ? ?

Declared on: line 508 of Lua/audio.lua.

function Audio:setBackgroundVolume(volume)

Parameters:

NameTypeDescription
volume ? ?

Declared on: line 482 of Lua/audio.lua.

function Audio:setSoundVolume(volume)

Parameters:

NameTypeDescription
volume ? ?

Declared on: line 491 of Lua/audio.lua.

function Audio:soundExists(sound)

Returns whether the given sound (either a string or a number)

exists in the sound archive

Parameters:

NameTypeDescription
sound ? The sound to look for, either a string (name) or a number (position in the list of sounds)

Declared on: line 293 of Lua/audio.lua.

function Audio:stopBackgroundTrack()

Stops playing background music for the time being.

Does not affect the configuration setting play_music.

Declared on: line 407 of Lua/audio.lua.

Page generated on Sat Feb 07, 2015 at 18:38:27 by LDocGen.