Skip to content

API Interface AudioHandle

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

Interface: AudioHandle

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

One sound started with Audio.playOneShot (§1). A value, safe to keep: once the voice ends or its slot is reused, every call is a no-op.

Extended by

Properties

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.


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.


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.


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.

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


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

Clone this wiki locally