Expand description
Deprecated: this crate is now weirdnet-streaming.
Version 0.3.2 only re-exports weirdnet-streaming, whole, so everything built on weirdnet-audio-stream keeps compiling and
shares its types with code that uses the new crate. The API is the 0.3 API unchanged (publisher, hub, recorded sources, net,
clock, and remote under feature route), plus what weirdnet-streaming adds (transport, stage, align, bus,
listen, along, clocked).
To move over, depend on weirdnet-streaming and write weirdnet_streaming where you wrote weirdnet_audio_stream.
No further releases are planned here beyond keeping the re-export in step.
Modules§
- align
- The stream input’s aligner: where each collaborator’s audio plays on your loop.
- along
- Record-along on the network: your dry stream (your own voices, each frame stamped with its loop position), your last loop as a stamped recorded take, and playing a collaborator’s take or live dry stream aligned to your loop.
- bus
- The audio side of listen-along, safe on the audio thread: a wrapper around the engine’s render callback that copies the master out into a ring (the tap, read by the network side to stream it) and adds samples from another ring (the mix, filled by a subscription to someone else’s master out). No locks and no allocation in the callback.
- clock
- How far another node’s clock is from this one’s, and how fast the gap grows.
- clocked
- A manual sink on its own clock: a thread that calls the render callback once per block at
the pace of a device whose clock runs
drift_ppmfast (or slow, when negative) against the monotonic clock. Used for instances whose output isnone, and in tests to inject drift. - listen
- Listen-along: the host streams its master out as raw PCM (32-bit float) over weirdnet-streaming; members of the session subscribe and hear it mixed into their own output. Each frame carries the sender’s wall-clock time (frame metadata, 8 bytes, microseconds since the Unix epoch) so a listener can measure the one-way delay when the clocks agree (same machine, or synced clocks). The take is kept and offered as a recorded stream that can be played from any position.
- net
- Streams over weirdnet-net: a
Hubserved on a node, and aSubscriberto one stream. - remote
- A remote executor (feature
route): the connections of aweirdnet_audio_routegraph between this node’sweirdnet_audio_enginerouter and other nodes. - stage
- Stage stream metadata (record-along): what a stream is, and where on the sender’s loop each frame belongs. The stream crate carries both as opaque bytes.
- transport
- Follow-transport: a headless master starts, stops, moves and paces several instances so they play on one session time.
- wire
- The wire format: length-prefixed messages on one weirdnet-net stream.
Structs§
- Allow
All - Lets everyone subscribe (tests, or a node whose connections are already gated).
- Buffer
Policy - How much a listener may queue.
- CodecId
- An opaque codec name, for the decoder; never interpreted here.
- Frame
- One frame of a stream.
- Hub
- The streams a node offers: live publishers and recorded sources.
- Listener
- The receiving side of one in-process subscription. Dropping it leaves the stream.
- Listener
Info - One listener as the publisher sees it.
- Memory
Source - A recorded stream held in memory.
- Publisher
- The sending side of one stream. Cheap to clone; clones share the stream.
- Recording
- Collects a live stream’s frames into a
MemorySource. - Stats
- What a subscriber has seen: frames, loss, and how late and how unevenly frames arrive.
- Stream
Id - A stream’s id, unique within its publisher’s hub.
- Stream
Info - What a stream is.
- Subscribe
Options - How to subscribe.
Enums§
- Overflow
- What happens when a listener’s queue is full.
- Start
- Where a subscription starts.
- Stream
Error - Why a stream call failed.
- Stream
Event - What a listener receives.
- Stream
Kind - Live (frames as they are produced) or recorded (finite, seekable).
Constants§
- PCM_
F32LE - Raw PCM, 32-bit float, little endian, interleaved.
- PCM_
S16LE - Raw PCM, signed 16-bit, little endian, interleaved.
Traits§
- Frame
Source - A recorded stream a server can play to subscribers.
- Stream
Auth - Decides whether
peermay subscribe tostream. A closure works.