Skip to main content

sim_lib_stream_coreaudio/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Modeled macOS CoreAudio stream-host adapter (in-process simulation).
4//!
5//! Modeled tier, no native I/O. This crate is a pure-Rust, in-process MODEL of
6//! a CoreAudio backend, not a binding to Apple's AudioToolbox/CoreAudio
7//! frameworks. The workspace forbids `unsafe` and the crate carries no
8//! `-sys`/FFI dependency, so it performs no real Apple framework I/O -- it
9//! serves deterministic fake PCM devices. The modeled tier is flagged by the
10//! default-on `model` feature; a native provider would live behind a separate
11//! FFI binding outside this repo.
12//!
13//! The simple macOS path uses PortAudio or RtAudio over CoreAudio. This crate
14//! exists for native CoreAudio coverage when that portable path is insufficient,
15//! while keeping workspace validation independent of Apple frameworks and
16//! hardware. MIDI remains separate: RtMidi is the macOS MIDI path, and this
17//! crate intentionally models only PCM devices.
18
19mod backend;
20mod bridge;
21mod model;
22mod runtime;
23
24pub use backend::{
25    CoreAudioBackend, coreaudio_audio_backend_candidate, coreaudio_backend_symbol,
26    coreaudio_clock_symbol, coreaudio_transport_symbol,
27};
28pub use bridge::CoreAudioRenderBridge;
29pub use model::{
30    CoreAudioDevice, CoreAudioTiming, macos_audio_backend_priority, macos_midi_backend_priority,
31};
32pub use runtime::{CoreAudioLib, install_stream_coreaudio_lib};
33
34#[cfg(test)]
35mod tests;