pub struct AudioRouting {
pub order: Vec<AudioNode>,
pub edges: Vec<AudioEdge>,
}Expand description
A project’s audio routing: every edge, and an order in which each node comes after the nodes that feed or key it.
Fields§
§order: Vec<AudioNode>Every track and bus, each after the nodes that feed or key it; among those ready, tracks in timeline order before buses in document order.
edges: Vec<AudioEdge>Every edge, grouped by the node that reads it (tracks in timeline order, buses in document order, then the master). In one group the edges a sum adds come first, in the order it adds them: from tracks in timeline order, then from buses in document order; for one source, its output before its sends in their order. Keys follow by effect position.
Implementations§
Source§impl AudioRouting
impl AudioRouting
Sourcepub fn alignment(
&self,
chain_latency: impl Fn(Option<AudioNode>, usize) -> u64,
) -> AudioAlignment
pub fn alignment( &self, chain_latency: impl Fn(Option<AudioNode>, usize) -> u64, ) -> AudioAlignment
Aligns every path to the output, given the delay of each effect chain: chain_latency
of the chain of a track or bus, or of the master for None, from the effect at the given
position to its end.
A consumer reads an edge ahead of the output by its own lead (none for the master) plus the latency of its chain from where the edge enters it: the start for an output or a send, the keyed effect for a key. A node’s lead is the largest such need among its edges, so its longest path is read directly and each shorter one waits for the difference.
Sourcepub fn liveness(&self, project: &Project) -> AudioLiveness
pub fn liveness(&self, project: &Project) -> AudioLiveness
Which edges of project, whose routing this is, carry signal, and which nodes are mixed.
A muted track or bus feeds and keys nothing. With nothing soloed every other output and send is live. Otherwise one is live when its source is soloed or fed by a soloed node, or its consumer is soloed or feeds one; the master is neither, so it hears a node only through the first rule. An output or send into a bus that reaches the master over no live edge is not live either.
Solo does not silence a key: a key is live when its source is unmuted and the keyed effect runs, and a node mixed only to form a key takes every unmuted input. A bus that is both heard under a solo and a key carries what the solo leaves it.
Sourcepub fn liveness_tapped(
&self,
project: &Project,
tapped: &[AudioNode],
) -> AudioLiveness
pub fn liveness_tapped( &self, project: &Project, tapped: &[AudioNode], ) -> AudioLiveness
Self::liveness when a host also reads the signal of each node in tapped: an
unmuted tapped node is mixed whatever is soloed, taking every unmuted input as a node
that forms a key does.