Skip to content

API Interface AudioTake

github-actions[bot] edited this page Nov 24, 2026 · 4 revisions

Interface: AudioTake

Defined in: src/plugins/audio/runtime/capture/take.ts:24

Audio.take (ADR 0348).

Properties

seconds

readonly seconds: number;

Defined in: src/plugins/audio/runtime/capture/take.ts:28

Seconds recorded (the running take's, else the last take's); 0 while idle.


state

readonly state: AudioTakeState;

Defined in: src/plugins/audio/runtime/capture/take.ts:26

"idle" -> "loading" (the recorder chunk fetching) -> "recording" -> "stopped" (a take exists to save).

Methods

mark()

mark(text): void;

Defined in: src/plugins/audio/runtime/capture/take.ts:34

A marker on the take's timeline (and the profile's) at now. No-op while no take records.

Parameters

text

string

Returns

void


save()

save(name?): Promise<string>;

Defined in: src/plugins/audio/runtime/capture/take.ts:36

Compress and save the take (*.sporesample); resolves with the web file name or the app-data path. Stops a running take first. Rejects with "nothing recorded: call Audio.take.start() first" when there is no take.

Parameters

name?

string

Returns

Promise<string>


start()

start(): Promise<void>;

Defined in: src/plugins/audio/runtime/capture/take.ts:30

Load the recorder (a lazy chunk) and begin a take, with a capture of the engine's profile beside it. Resolves once recording; rejects with a message if the audio core isn't available. A second call while recording does nothing.

Returns

Promise<void>


stop()

stop(): void;

Defined in: src/plugins/audio/runtime/capture/take.ts:32

End the take. It is kept for save() until the next start().

Returns

void

Clone this wiki locally