SlashCo Wiki

SlashCo.AudioSystem.GetPrecachedChannel

 IGModAudioChannel SlashCo.AudioSystem.GetPrecachedChannel( string identifier, function callback, SoundData precacheData )

Description

Returns the given precached channel using the identifier, returns nil on failure. If given a callback, it will use that function which will be more reliable.

Arguments

1string identifier

The identifier to use for this sound

2function callback

The callback function after creation

Function argument(s):
1IGModAudioChannel channel -

The created channel

Function return argument(s):

3SoundData precacheData

The SoundData to use in case the channel is missing

Returns

1IGModAudioChannel channel

The precached channel. This function will NOT return anything if you used a callback and usually you should always use a callback.