Skip to main content

weirdnet_audio_route/
lib.rs

1//! The audio routing model for Weirdnet: ports, a graph of connections, validation and records.
2//!
3//! * A [`PortInfo`] is an output or input of a node (an app instance, a device, a file or a
4//!   controller channel), with a stable [`PortId`] that projects save.
5//! * A [`Graph`] holds ports and [`Connection`]s from an output to an input. Fan-out and fan-in
6//!   are allowed; [`Graph::connect`] refuses unknown ports, wrong directions, format or kind
7//!   mismatches, cycles, duplicates, and anything a [`Gate`] denies (for example the audio
8//!   owner's consent).
9//! * [`Graph::order`] gives a deterministic processing order, [`Graph::latency_at`] the latency
10//!   that reaches an input, and [`Graph::to_records`] / [`Graph::from_records`] a form to save
11//!   and sync.
12//! * Executors turn a graph into audio movement ([`Executor`]): the engine wires buses in one
13//!   process, weirdnet-audio-stream carries remote edges. None of that lives here.
14#![forbid(unsafe_code)]
15
16mod graph;
17mod port;
18
19pub use graph::{ConnectOptions, Connection, ConnectionId, Executor, Gate, Graph, Record, RouteError};
20pub use port::{Direction, LatencyQuality, NodeId, PortFormat, PortId, PortInfo, PortKind, PortLatency};