Skip to main content

AUDIO

Constant AUDIO 

Source
pub const AUDIO: &str = "type Audio { source: Str = \"\"; volume: Number = 1; }";
Expand description

An audio resource request with a gain value.

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

§Declaration

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

§Fields and methods

  • source: Host-defined audio locator; defaults to empty.

  • volume: Requested linear gain; defaults to 1 and is interpreted by the host.

§Describe audio

Construction does not resolve or play the source.

let value = Audio { source: "tone.wav", volume: 0.5 };
print(value.volume);