Skip to main content

extract_settings

Function extract_settings 

Source
pub(crate) fn extract_settings(s: &Bound<'_, PyAny>) -> PyResult<Settings>
Expand description

Read a Python AudioCaptureSettings into a Rust Settings by attribute name, rejecting with ValueError what the worker could only fail on later.

opus_bitrate is clamped into the Opus range exactly as update_audio_bitrate clamps a live update; red_distance into [0, RED_MAX_DISTANCE] — it selects how many redundant Opus copies each frame carries, and cannot exceed the RFC 2198 history depth. latency_ms == 0 selects the default fragment size.