pub struct AudioOutputBackend { /* private fields */ }Expand description
Production stereo f32 PCM audio mixer draining AudioBus with native macOS CoreAudio AUHAL output and deterministic pull mode.
Implementations§
Source§impl AudioOutputBackend
Production AudioBus ingestion, stereo PCM ring-buffer mixing, and native CoreAudio AUHAL startup for AudioOutputBackend.
impl AudioOutputBackend
Production AudioBus ingestion, stereo PCM ring-buffer mixing, and native CoreAudio AUHAL startup for AudioOutputBackend.
Sourcepub fn new_pull_mixer(config: AudioOutputConfig) -> Self
pub fn new_pull_mixer(config: AudioOutputConfig) -> Self
Sourcepub fn start_native(config: AudioOutputConfig) -> Result<Self, AudioOutputError>
pub fn start_native(config: AudioOutputConfig) -> Result<Self, AudioOutputError>
Sourcepub fn ingest_bus(&mut self, bus: &mut AudioBus) -> usize
pub fn ingest_bus(&mut self, bus: &mut AudioBus) -> usize
Sourcepub fn enqueue_command(&mut self, command: AudioCommand)
pub fn enqueue_command(&mut self, command: AudioCommand)
Enqueues a single spatialized AudioCommand directly into the mixer voice pool.
§Arguments
AudioCommand- Audio command specifying cue, volume, pan, and pitch.
Sourcepub fn mix_into_ring(&mut self, frames: usize) -> usize
pub fn mix_into_ring(&mut self, frames: usize) -> usize
Sourcepub fn pull_interleaved_f32(&mut self, output: &mut [f32]) -> usize
pub fn pull_interleaved_f32(&mut self, output: &mut [f32]) -> usize
Sourcepub fn set_master_gain(&mut self, gain: f32)
pub fn set_master_gain(&mut self, gain: f32)
Updates the mixer master linear output gain (clamped to [0.0, 2.0]).
§Arguments
f32- Target master linear gain.
Sourcepub fn set_muted(&mut self, muted: bool)
pub fn set_muted(&mut self, muted: bool)
Toggles global audio mixer muting without stopping active voice progression.
§Arguments
bool-trueto mute output to silence,falseto unmute.
Sourcepub fn pause(&mut self)
pub fn pause(&mut self)
Pauses output rendering without discarding queued voices or buffered frames.
Sourcepub fn stop(&mut self)
pub fn stop(&mut self)
Stops any native OS audio driver, clears buffered PCM frames, and transitions to Stopped.
Sourcepub fn metrics(&self) -> AudioOutputMetrics
pub fn metrics(&self) -> AudioOutputMetrics
Captures a live telemetry snapshot of driver status, voice count, ring fill, underruns, and peak amplitude.
§Returns
AudioOutputMetrics- Current audio output telemetry snapshot.
Source§impl AudioOutputBackend
Implements impl #impl_generics #name #ty_generics #where_clause.
impl AudioOutputBackend
Implements impl #impl_generics #name #ty_generics #where_clause.
pub fn get_config(&self) -> AudioOutputConfig
pub fn get_mut_config(&mut self) -> &mut AudioOutputConfig
pub fn set_config(&mut self, val: AudioOutputConfig) -> &mut Self
pub fn get_driver_kind(&self) -> AudioDriverKind
pub fn get_mut_driver_kind(&mut self) -> &mut AudioDriverKind
pub fn set_driver_kind(&mut self, val: AudioDriverKind) -> &mut Self
pub fn get_state(&self) -> AudioOutputState
pub fn get_mut_state(&mut self) -> &mut AudioOutputState
pub fn set_state(&mut self, val: AudioOutputState) -> &mut Self
Trait Implementations§
Source§impl Debug for AudioOutputBackend
Structured Debug formatting for AudioOutputBackend.
impl Debug for AudioOutputBackend
Structured Debug formatting for AudioOutputBackend.
Source§impl Default for AudioOutputBackend
Default pull-mode AudioOutputBackend ready for cross-platform deterministic mixing.
impl Default for AudioOutputBackend
Default pull-mode AudioOutputBackend ready for cross-platform deterministic mixing.
Source§impl Drop for AudioOutputBackend
Safe teardown stopping any active hardware driver on AudioOutputBackend drop.
impl Drop for AudioOutputBackend
Safe teardown stopping any active hardware driver on AudioOutputBackend drop.