Show raw api
{
"functions": [
{
"name": "new",
"desc": "Constructs a new LayeredLoopedSoundPlayer.",
"params": [
{
"name": "soundParent",
"desc": "Optional parent for sounds",
"lua_type": "Instance?"
}
],
"returns": [
{
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
}
],
"function_type": "static",
"source": {
"line": 46,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "SetDefaultCrossFadeTime",
"desc": "Sets the default cross fade time for the LayeredLoopedSoundPlayer.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "crossFadeTime",
"desc": "",
"lua_type": "ValueObject.Mountable<number>\n"
}
],
"returns": [
{
"desc": "",
"lua_type": "() -> ()\n"
}
],
"function_type": "static",
"source": {
"line": 69,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "SetVolumeMultiplier",
"desc": "Sets the volume multiplier for the LayeredLoopedSoundPlayer.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "volumeMultiplier",
"desc": "",
"lua_type": "ValueObject.Mountable<number>\n"
}
],
"returns": [
{
"desc": "",
"lua_type": "() -> ()\n"
}
],
"function_type": "static",
"source": {
"line": 79,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "SetBPM",
"desc": "Sets the BPM for syncing sound playback.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "bpm",
"desc": "",
"lua_type": "ValueObject.Mountable<number?>"
}
],
"returns": [
{
"desc": "",
"lua_type": "() -> ()\n"
}
],
"function_type": "static",
"source": {
"line": 89,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "SetSoundParent",
"desc": "Sets the parent instance for the LayeredLoopedSoundPlayer.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "soundParent",
"desc": "",
"lua_type": "Instance?"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 96,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "SetSoundGroup",
"desc": "Sets the sound group for the LayeredLoopedSoundPlayer.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "soundGroup",
"desc": "",
"lua_type": "ValueObject.Mountable<SoundGroup?>\n"
}
],
"returns": [
{
"desc": "",
"lua_type": "() -> ()\n"
}
],
"function_type": "static",
"source": {
"line": 105,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "Swap",
"desc": "Swaps the layer to play the given sound on loop schedule.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "layerId",
"desc": "",
"lua_type": "string"
},
{
"name": "soundId",
"desc": "",
"lua_type": "SoundUtils.SoundId"
},
{
"name": "scheduleOptions",
"desc": "",
"lua_type": "SoundLoopScheduleUtils.SoundLoopSchedule?\n"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 115,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "SwapOnLoop",
"desc": "Swaps the layer to play on the next loop.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "layerId",
"desc": "",
"lua_type": "string"
},
{
"name": "soundId",
"desc": "",
"lua_type": "SoundUtils.SoundId"
},
{
"name": "scheduleOptions",
"desc": "",
"lua_type": "SoundLoopScheduleUtils.SoundLoopSchedule?\n"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 132,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "SwapToSamples",
"desc": "Swaps the layer to play from a list of samples.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "layerId",
"desc": "",
"lua_type": "string"
},
{
"name": "soundIdList",
"desc": "",
"lua_type": "{ SoundUtils.SoundId }"
},
{
"name": "scheduleOptions",
"desc": "",
"lua_type": "SoundLoopScheduleUtils.SoundLoopSchedule?\n"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 148,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "SwapToChoice",
"desc": "Swaps the layer to play a random choice from a list of samples.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "layerId",
"desc": "",
"lua_type": "string"
},
{
"name": "soundIdList",
"desc": "",
"lua_type": "{ SoundUtils.SoundId }"
},
{
"name": "scheduleOptions",
"desc": "",
"lua_type": "SoundLoopScheduleUtils.SoundLoopSchedule?\n"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 165,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "PlayOnce",
"desc": "Plays the given sound once on the layer.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "layerId",
"desc": "",
"lua_type": "string"
},
{
"name": "soundId",
"desc": "",
"lua_type": "SoundUtils.SoundId"
},
{
"name": "scheduleOptions",
"desc": "",
"lua_type": "SoundLoopScheduleUtils.SoundLoopSchedule?\n"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 182,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "PlayOnceOnLoop",
"desc": "Plays the given sound once on the next loop of the layer.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "layerId",
"desc": "",
"lua_type": "string"
},
{
"name": "soundId",
"desc": "",
"lua_type": "SoundUtils.SoundId"
},
{
"name": "scheduleOptions",
"desc": "",
"lua_type": "SoundLoopScheduleUtils.SoundLoopSchedule?\n"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 198,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
},
{
"name": "StopLayer",
"desc": "Stops playback on the given layer.",
"params": [
{
"name": "self",
"desc": "",
"lua_type": "LayeredLoopedSoundPlayer"
},
{
"name": "layerId",
"desc": "",
"lua_type": "string"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 263,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
}
],
"properties": [],
"types": [],
"name": "LayeredLoopedSoundPlayer",
"desc": "This class provides layered synchronized sound playback with looping and scheduling, which is useful for\nimplementing complex ambient soundscapes or music tracks that require multiple layers to be played in sync, for example,\nconstructed music that adapts to game states.",
"source": {
"line": 9,
"path": "src/soundplayer/src/Client/Loops/Layered/LayeredLoopedSoundPlayer.lua"
}
}