Skip to main content

subscribe_mic_level

Function subscribe_mic_level 

Source
pub fn subscribe_mic_level(handler: impl Fn(f32) + 'static)
Expand description

Subscribe to the mic-level Tauri event (M-AUDIO.METER / AUT-287) emitted by MicCapturePipeline at ~20 Hz. The handler receives an EMA-smoothed RMS in [0.0, ~1.0].

Returns immediately; the listener runs for the lifetime of the app (no cancellation today — the worker stops emitting when stop_mic_capture drops the pipeline, which is sufficient cleanup).