Skip to content
Konjure / spatial intelligence

Audio

← Builtin reference

An audio resource request with a gain value.

Signature

type Audio { source: Str = ""; volume: Number = 1; }

This schema does not decode or play audio. The host resolves source, owns I/O and playback lifecycle, and interprets the requested linear gain.

Fields

source: Str
Host-defined audio locator; defaults to empty.
Default""
volume: f64
Requested linear gain; defaults to 1 and is interpreted by the host.
Default1

Examples

Describe audio

Construction does not resolve or play the source.

Tick 0 · 0.00 s⌘ / Ctrl + EnterThis device
main.kj
Loading the language runtime…
Output 0
No output.
Expected output
0.5

Rust definition

Interpreter RecordValue resource schema, not an audio decoder or playback handle.

See also