Skip to content

API Interface AudioPlaylistHandle

github-actions[bot] edited this page Nov 29, 2026 · 3 revisions

Interface: AudioPlaylistHandle

Defined in: src/plugins/audio/runtime/backendSeam.ts:241

ADR 0343: a playing playlist (or sample), what Audio.play returns. ADR 0158 §5's members keep their meaning across all of the instance's voices; ADR 0166 §1.2 adds music, onMusic and trigger (declared in MusicEventHandle); ADR 0343 adds onMarker.

Extends

Extended by

Properties

music

readonly music: MusicHandle | undefined;

Defined in: src/engine/core/musicEvents.ts:45

The music state; undefined unless the event's root is a segment, playlist or musicSwitch.

Inherited from

MusicEventHandle.music


occlusion

readonly occlusion: number;

Defined in: src/plugins/audio/runtime/backendSeam.ts:62

ADR 0162 §1.1: the smoothed dry occlusion gain (1 open, lower as walls muffle it), read from the main-thread mirror.

Inherited from

AudioHandle.occlusion


panner

readonly panner: AudioPanner | null;

Defined in: src/plugins/audio/runtime/backendSeam.ts:60

ADR 0162 §1.1: the panner the sound uses ("flat", "equalPower", "hrtf", "bed" or "ambisonic"), read from the main-thread mirror; null once it has ended.

Inherited from

AudioHandle.panner


paused

readonly paused: boolean;

Defined in: src/plugins/audio/runtime/backendSeam.ts:269

ADR 0362 §1: true from pause() until resume() or stop().


playing

readonly playing: boolean;

Defined in: src/plugins/audio/runtime/backendSeam.ts:52

True from the call to playOneShot until the sound ends or is stopped. Virtual, bus-muted, locked and waiting-for-data sounds are playing (they exist and keep time). Stolen and failed sounds are not. Natural ends are seen up to one frame late.

Inherited from

AudioHandle.playing


position

position: Vec3Like | null;

Defined in: src/plugins/audio/runtime/backendSeam.ts:247

Where a spatial playlist plays; set it to move it. Null for a flat one.


reason

readonly reason: AudioReason | null;

Defined in: src/plugins/audio/runtime/backendSeam.ts:54

Why it isn't audible (while playing) or why it ended early ("stolen", "failed"); null when audible, or finished or stopped normally.

Inherited from

AudioHandle.reason

Methods

fade()

fade(to, seconds): void;

Defined in: src/plugins/audio/runtime/backendSeam.ts:58

Ease this sound's own gain multiplier to to (linear, 0..4) over seconds (0 = at once).

Parameters

to

number

seconds

number

Returns

void

Inherited from

AudioHandle.fade


getParameter()

getParameter(name): string | number | undefined;

Defined in: src/plugins/audio/runtime/backendSeam.ts:245

One of the playlist's parameters, else a global one; undefined if neither.

Parameters

name

string

Returns

string | number | undefined


onMarker()

onMarker(type, fn): () => void;

Defined in: src/plugins/audio/runtime/backendSeam.ts:258

Call fn each time a Cue, Exit or Hit marker of a playing sample, or a sequence's cue or exit marker, passes. Returns an unsubscribe function. Markers are found on main from the planned playhead or voice position and reported on the first frame whose heard clock has passed them (e.time is the exact heard time).

Parameters

type

AudioMarkerType

fn

(e) => void

Returns

() => void


onMusic()

onMusic(kind, fn): () => void;

Defined in: src/engine/core/musicEvents.ts:50

Subscribe to beat, bar or cue events of this music instance, for scripts that Audio.play music with no node (M4c; owner decision 3). Returns an unsubscribe function. A non-music handle returns a no-op function.

Parameters

kind

MusicKind

fn

(e) => void

Returns

() => void

Inherited from

MusicEventHandle.onMusic


pause()

pause(): void;

Defined in: src/plugins/audio/runtime/backendSeam.ts:265

ADR 0362 §1: hold the playback where it is: its voices, timers, sequence clock and pending picks wait, and resume() continues it from that same position (the musical clock, markers and beat callbacks hold too). Pausing a paused playback, or resuming one that isn't paused, does nothing; stop() stops a paused one. Changes to its parameters while paused take effect when it resumes.

Returns

void


release()

release(): void;

Defined in: src/plugins/audio/runtime/backendSeam.ts:252

Key-off: held loops end by their exit settings, a Blend's envelope releases, a continuous Queue stops picking; the instance ends when its voices do (an untilStopped playlist too). A no-op without any of those.

Returns

void


resume()

resume(): void;

Defined in: src/plugins/audio/runtime/backendSeam.ts:267

ADR 0362 §1: continue a paused playback from where it held. A no-op when it isn't paused.

Returns

void


setParameter()

setParameter(name, value): void;

Defined in: src/plugins/audio/runtime/backendSeam.ts:243

Set one of the playlist's own parameters (labelled ones by label). Unknown names warn once.

Parameters

name

string

value

string | number

Returns

void


stop()

stop(fadeSeconds?): void;

Defined in: src/plugins/audio/runtime/backendSeam.ts:56

Stop now, or fade to silence over fadeSeconds (default 0) and stop. A second call is a no-op.

Parameters

fadeSeconds?

number

Returns

void

Inherited from

AudioHandle.stop


trigger()

trigger(name): boolean;

Defined in: src/engine/core/musicEvents.ts:55

Fire the stinger whose trigger is name. True when accepted; false when unknown, dropped by dontRepeat or ifTooLate: "skip", or the pool refused it (the debug rows say which).

Parameters

name

string

Returns

boolean

Inherited from

MusicEventHandle.trigger

Clone this wiki locally