Skip to content

PlayingSound

Sound typessource

Handle to a playing sound, start the sound paused to make sure you can apply changes before playing it You can just discard this handle if you do not need extended control anymore

Methods

get_parameter

function PlayingSound:get_parameter(parameter_index: VANILLA_SOUND_PARAM): number?
parameter_index: VANILLA_SOUND_PARAM

Returns number? (may be nil)

source

get_parameters

function PlayingSound:get_parameters(): table<integer, string>

Returns table<integer, string>

source

is_playing

function PlayingSound:is_playing(): boolean

Returns boolean

source

set_callback

function PlayingSound:set_callback(callback: fun())
callback: fun()
source

set_looping

function PlayingSound:set_looping(loop_mode: SOUND_LOOP_MODE): boolean
loop_mode: SOUND_LOOP_MODE

Returns boolean

source

set_mute

function PlayingSound:set_mute(mute: boolean): boolean
mute: boolean

Returns boolean

source

set_pan

function PlayingSound:set_pan(pan: number): boolean
pan: number

Returns boolean

source

set_parameter

function PlayingSound:set_parameter(parameter_index: VANILLA_SOUND_PARAM, value: number): boolean
parameter_index: VANILLA_SOUND_PARAM
value: number

Returns boolean

source

set_pause

function PlayingSound:set_pause(pause: boolean): boolean
pause: boolean

Returns boolean

source

set_pitch

function PlayingSound:set_pitch(pitch: number): boolean
pitch: number

Returns boolean

source

set_volume

function PlayingSound:set_volume(volume: number): boolean
volume: number

Returns boolean

source

stop

function PlayingSound:stop(): boolean

Returns boolean

source