weirdnet-audio-stream 0.3.0

General-purpose audio streaming for Weirdnet: publish and subscribe to live or recorded streams of codec-agnostic frames, many listeners with their own bounded queues, seeking, arrival statistics and per-subscription authorisation.
Documentation
//! General-purpose audio streaming for Weirdnet.
//!
//! * A [`Publisher`] sends [`Frame`]s of one stream to any number of listeners. It never
//!   blocks: each listener has its own bounded queue and an [`Overflow`] policy, so a slow
//!   listener never slows the others.
//! * A late live listener starts at the next key frame; a [`MemorySource`] holds a recorded
//!   stream that listeners can seek in.
//! * Frames are codec-agnostic: the crate moves bytes and a [`CodecId`] and never decodes.
//!   Raw PCM needs no codec ([`StreamInfo::pcm_f32`]). Streams and frames carry optional
//!   opaque app metadata that the crate never reads.
//! * [`clock`]: another node's clock offset by request and reply, and its drift by a line fit.
//! * `remote` (feature `route`): a weirdnet-audio-route executor carrying connections between a weirdnet-audio-engine
//!   router and other nodes, with resampling, drift following and measured delay.
//! * [`net`] serves a [`Hub`] of streams over weirdnet-net streams, with an authoriser per
//!   subscription, and [`net::Subscriber`] connects to one, with [`Stats`] on arrival delay,
//!   jitter and loss.
#![forbid(unsafe_code)]

pub mod clock;
mod hub;
pub mod net;
#[cfg(feature = "route")]
pub mod remote;
mod source;
mod stats;
mod types;
pub mod wire;

pub use hub::{Listener, ListenerInfo, Publisher};
pub use net::{AllowAll, Hub, StreamAuth};
pub use source::{FrameSource, MemorySource, Recording};
pub use stats::Stats;
pub use types::{
    BufferPolicy, CodecId, Frame, Overflow, PCM_F32LE, PCM_S16LE, Start, StreamError, StreamEvent, StreamId, StreamInfo, StreamKind, SubscribeOptions,
};