Skip to main content

Module listen

Module listen 

Source
Expand description

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.

Structs§

ListenStats
What a listener measured.
StreamMeta
Stream metadata: what the stream is.

Constants§

FRAME_MS
Samples per channel in one frame: 10 ms at 48 kHz.
MASTER
The live master out stream.
TAKE
The last take of the master out, recorded and seekable.
TAKE_SECONDS
The longest take kept, in seconds.

Functions§

play
Plays a subscription into the mix until it ends or stop.
pump
Moves the tap into frames on a publisher, and the take into a recording. Runs until stop.
sent_us
The send time carried in a frame’s metadata.
wall_us
The wall-clock time now, microseconds since the Unix epoch.