Skip to main content

AUDIO_STREAM

Constant AUDIO_STREAM 

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

A live audio input request with a gain value.

The host owns microphone permission, capture lifecycle, and stream routing; this declaration does not open a microphone.

§Declaration

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

§Fields and methods

  • source: Host-defined live-audio selector; defaults to microphone.

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

§Request audio input

A host must grant permission and create any actual stream.

let value = AudioStream {};
print(value.source);