capture-system-or-process-audio-core
Looking to capture system, application, or microphone audio in Rust? Depend on the unified safe-Rust facade crate
capture-system-or-process-audioinstead 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): DefinesAudioStreamBackend,OpenableStreamBackend,DiscoveryBackend,CaptureManagerBackend,PermissionsBackend,DefaultEndpointObserver, andTopologyControllerBackend, 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): Preallocatedstorage::Pool(Pool::new_reservedcharged againstmanager::StorageBudget) and ticket-watermarked single-producer / single-consumerordering::channelsupporting zero-extra-copy variable reads, reusable-bufferread_into, per-operationCancellation, sequentialCallbackStreamdelivery with unwind containment, andStop::DrainvsStop::Abortteardown. - Target Schema, Discovery & Planner (
schema,discovery,planner,routing): DeterministicCaptureTarget(process,application,device,default_output,default_input/microphone,input_device),PermissionReport(PermissionKind, 5-statePermissionState,PermissionPolicy),DiscoveryService(parent-tree application roll-up,ByLogicalTarget&PerBackenddeduplication, bounded256-event cursor subscriptions), side-effect-freeCaptureRequest::inspect(), and LIFORouteRollbackGuard. - Zero-Allocation Steady-State Mixing & Conversion (
converter,mixer,manager): Stateful pre-mixInputNormalizer(64-tap 4-term Blackman-Harris polyphase sinc resampler + channel mapper) andFrameReblocker,CspaMixer(20 msalignment,f32accumulation,NaN/±Infsanitization, clock-domain-gated skew and5 ms/64-frame crossfade drift compensation,silence_on_idle), post-mixOutputConverter(F32/I16/I24/I32+ stateless SplitMix64 TPDF dither), andMultiInputManager(0steady-state heap allocations onread_mixed_into).
Links & License
- Official User Manual & Architecture Docs: https://s0d3s.github.io/capture-system-or-process-audio/
- Main Crate & Documentation: https://crates.io/crates/capture-system-or-process-audio · https://docs.rs/capture-system-or-process-audio
- Repository: https://github.com/s0d3s/capture-system-or-process-audio
- License: Dual-licensed under MIT or Apache-2.0, at your option.