Skip to main content

trem_cpal/
lib.rs

1//! # trem-cpal — real-time audio backend
2//!
3//! Drives a [`trem::graph::Graph`] from a cpal output stream with lock-free
4//! command/notification bridging between the audio thread and the UI.
5//!
6//! The [`Bridge`] / [`AudioBridge`] pair communicates via an [`rtrb`] ring
7//! buffer. The UI sends [`Command`]s (play, pause, stop, set parameter, load events),
8//! and the audio callback sends back [`Notification`]s (beat position, peak meters).
9
10pub mod bridge;
11pub mod driver;
12
13pub use bridge::{
14    create_bridge, AudioBridge, Bridge, Command, Notification, ScopeFocus, ScopeSnapshot,
15};
16pub use driver::AudioEngine;