Skip to main content

Module remote

Module remote 

Source
Expand description

A remote executor (feature route): the connections of a weirdnet_audio_route graph between this node’s weirdnet_audio_engine router and other nodes.

A connection from a port of this router to a port elsewhere is sent: the port feeds a router tap, and a pump sends what the tap holds as a live raw PCM stream whose id is the port id. A connection from a port elsewhere to a port of this router is received: a subscription to that port’s stream on the node that has it goes through a resampler into a router input, routed to the port with the connection’s gain. Connections with both ends here are left to the router’s own executor, and the router’s own wiring is never touched.

Receiving keeps about RemoteOptions::playout_ms of audio queued, which absorbs network jitter, and trims the resampler’s ratio to hold that level, which follows the sender’s audio clock running a little fast or slow. The sender’s clock is measured with crate::clock, and every link reports its transit time, buffer, total delay and drift in a LinkReport; an app writes the delay into the graph with Graph::set_measured_delay.

Who may subscribe is decided by the StreamAuth the executor serves its hub with, so a connection the sender’s permissions refuse is reported as LinkState::Denied and carries nothing.

Structs§

LinkReport
One link’s numbers.
PeerTable
A Peers table an app fills as it learns where nodes are (from a registry, a session or a discovery message), shared between the app and the RemoteExecutor.
RemoteExecutor
Carries a graph’s connections between this node’s router and other nodes.
RemoteOptions
Tuning.

Enums§

LinkDir
Which way a link carries audio.
LinkState
How a link is doing.

Constants§

EPOCH_PARAM
The stream parameter carrying the sender’s clock reading, in nanoseconds, at the stream’s first sample.
MIN_BUFFER_MS
The least buffer a link keeps when aligning, milliseconds.

Traits§

Peers
Where other nodes are.