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 remains PortAudio or a future RtAudio adapter over
14//! CoreAudio. This crate exists for native CoreAudio coverage when that portable
15//! path is insufficient, while keeping workspace validation independent of
16//! Apple frameworks and hardware. MIDI remains separate: RtMidi is the first
17//! macOS MIDI path, and this crate intentionally models only PCM devices.
18
19mod backend;
20mod bridge;
21mod model;
22mod runtime;
23
24pub use backend::{
25    CoreAudioBackend, coreaudio_backend_symbol, coreaudio_clock_symbol, coreaudio_transport_symbol,
26};
27pub use bridge::CoreAudioRenderBridge;
28pub use model::{
29    CoreAudioDevice, CoreAudioTiming, macos_audio_backend_priority, macos_midi_backend_priority,
30};
31pub use runtime::{CoreAudioLib, install_stream_coreaudio_lib};
32
33#[cfg(test)]
34mod tests;