1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Streaming for Weirdnet: audio streams between nodes, the transport that keeps them together, and the loop-positioned streams
//! apps record along with.
//!
//! **Streams** (the core, moved here from `weirdnet-audio-stream`)
//!
//! * 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.
//! * [`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.
//! * [`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, and a [`remote::PeerTable`] to tell it where nodes are.
//!
//! **Transport**
//!
//! * [`transport`]: the follow-transport protocol (`Prepare`, `Ready`, `Start`, `Stop`, `Locate`, `Tempo`, `Beacon`), the
//! [`transport::SessionClock`] an instance learns from a master's messages, and the [`transport::Follower`] that turns them
//! into engine actions on the right audio block. It is a plain message type: the app chooses how to carry it.
//!
//! **Loop-positioned streams (record-along)**
//!
//! * [`stage`]: stream and frame metadata saying where on the sender's loop each frame belongs, and [`stage::Grid`] to turn that
//! into the listener's own frames at any sample rate.
//! * [`align`]: where a collaborator's audio plays on your loop (recorded exact, live bar-aligned or immediate).
//! * [`bus`]: the audio-thread side, a tap and a mix that never lock or allocate in the render callback.
//! * [`listen`] and [`along`]: the network side, listen-along (a master out as a stream) and record-along (a dry stream and take,
//! and playing a collaborator's aligned to your loop).
//! * [`clocked`]: a manual sink on its own clock, to run without a device or to inject drift in tests.
pub use ;
pub use ;
pub use ;
pub use Stats;
pub use ;
/// Locks `m`, taking the data from a poisoned lock (a panic elsewhere must not stop the audio side).
pub