capture-system-or-process-audio-core 1.4.0

Safe-Rust portable PCM stream contracts, software mixer, resampler, and core backend traits for capture-system-or-process-audio
Documentation

capture-system-or-process-audio-core

capture-system-or-process-audio

Looking to capture system, application, or microphone audio in Rust? Depend on the unified safe-Rust facade crate capture-system-or-process-audio instead of importing this internal portable core crate directly.

capture-system-or-process-audio-core (#![forbid(unsafe_code)]) owns the platform-independent schemas, lock-free bounded SPSC handoff, DSP pipeline, planning engine, and backend trait hierarchy shared by the Windows, Linux, and macOS backend crates:

  • Core Backend Trait Hierarchy (traits): Defines AudioStreamBackend, OpenableStreamBackend, DiscoveryBackend, CaptureManagerBackend, PermissionsBackend, DefaultEndpointObserver, and TopologyControllerBackend, alongside zero-cost #[repr(transparent)] static-dispatch wrappers (AudioStream<B>, Discovery<B>, CaptureManager<B>, Permissions<B>).
  • Bounded Lock-Free PCM Ownership (storage, ordering, reads, lifecycle): Preallocated storage::Pool (Pool::new_reserved charged against manager::StorageBudget) and ticket-watermarked single-producer / single-consumer ordering::channel supporting zero-extra-copy variable reads, reusable-buffer read_into, per-operation Cancellation, sequential CallbackStream delivery with unwind containment, and Stop::Drain vs Stop::Abort teardown.
  • Target Schema, Discovery & Planner (schema, discovery, planner, routing): Deterministic CaptureTarget (process, application, device, default_output, default_input / microphone, input_device), PermissionReport (PermissionKind, 5-state PermissionState, PermissionPolicy), DiscoveryService (parent-tree application roll-up, ByLogicalTarget & PerBackend deduplication, bounded 256-event cursor subscriptions), side-effect-free CaptureRequest::inspect(), and LIFO RouteRollbackGuard.
  • Zero-Allocation Steady-State Mixing & Conversion (converter, mixer, manager): Stateful pre-mix InputNormalizer (64-tap 4-term Blackman-Harris polyphase sinc resampler + channel mapper) and FrameReblocker, CspaMixer (20 ms alignment, f32 accumulation, NaN/±Inf sanitization, clock-domain-gated skew and 5 ms / 64-frame crossfade drift compensation, silence_on_idle), post-mix OutputConverter (F32/I16/I24/I32 + stateless SplitMix64 TPDF dither), and MultiInputManager (0 steady-state heap allocations on read_mixed_into).

Links & License