Skip to content

Python API — Mixer, Converter & Budgets

Configuration value objects for CspaMixer drift/silence control, OutputConverter sample-rate/channel/dither pipelines, strategy bounds, and session memory ceilings.


Configuration for CspaMixer (20 ms alignment grid, silence_on_idle, clamp_f32, 64-frame crossfade drift thresholds, on_input_failure).

class MixerConfig(alignment_window_ms: SupportsIndex=20, max_input_buffer_ms: SupportsIndex=100, max_input_slots: SupportsIndex=8, output_queue_slots: SupportsIndex=8, clamp_f32: bool=False, drift_threshold_ms: SupportsIndex=5, drift_hysteresis_ms: SupportsIndex=2, drift_hold_ms: SupportsIndex=500, drift_crossfade_frames: SupportsIndex=64, silence_on_idle: bool=False, on_input_failure: OnInputFailure | str=...) -> MixerConfig
Property Type
alignment_window_ms int
clamp_f32 bool
drift_crossfade_frames int
drift_hold_ms int
drift_hysteresis_ms int
drift_threshold_ms int
max_input_buffer_ms int
max_input_slots int
on_input_failure OnInputFailure
output_queue_slots int
silence_on_idle bool

Post-mix format converter (16 kHz / 24 kHz / 44.1 kHz / 48 kHz, channel mapping, F32/I16/I24/I32, SplitMix64 TPDF dither).

class OutputConverter(rate: SupportsIndex=48000, channels: SupportsIndex=2, sample_format: SampleType | str=..., byte_order: ByteOrder | str=..., dither: DitherMode | str=..., layout: SupportsGetItem[int, Channel | str] | None=None) -> OutputConverter
Property Type
byte_order ByteOrder
channels int
dither DitherMode
format Format
rate int
sample_format SampleType

Inclusive per-target [start_level, fallback_limit] bounds over ProcessTreeStrategy.

class ProcessTreeRange(start_level: ProcessTreeStrategy | str=..., fallback_limit: ProcessTreeStrategy | str | None=...) -> ProcessTreeRange
Property Type
fallback_limit ProcessTreeStrategy | None
start_level ProcessTreeStrategy
def allows(level: ProcessTreeStrategy | str) -> bool

Session resource ceilings (max_targets=16, max_active_streams=16, max_total_pcm_memory=16 MiB, cleanup_timeout_ms=2000).

class AggregateManagerBudgets(max_targets: SupportsIndex=16, max_active_streams: SupportsIndex=16, max_pending_opens: SupportsIndex=4, max_native_graph_links: SupportsIndex=64, max_discovery_queue: SupportsIndex=256, max_total_pcm_memory: SupportsIndex=16777216, cleanup_timeout_ms: SupportsIndex=2000) -> AggregateManagerBudgets
Property Type
cleanup_timeout_ms int
max_active_streams int
max_discovery_queue int
max_native_graph_links int
max_pending_opens int
max_targets int
max_total_pcm_memory int