enum Residual<'a> {
Leaf {
window: Range<f64>,
internal: f64,
rate: Option<fn(f64) -> f64>,
track: &'a AudioTrack,
},
Node {
window: Range<f64>,
internal: f64,
rate: Option<fn(f64) -> f64>,
children: Vec<Residual<'a>>,
},
}Expand description
The non-linear remainder of the audio plane, as a compact tree.
Built at bake time from the collected root-to-leaf paths of sound leaves behind non-linear rates, sharing common prefixes so ancestors evaluate once per sample. Every node carries only what the per-sample walk reads — the timing shell and the track reference, ~40 bytes — because sibling scanning is cache-bound: a warp container forces its children to be window-checked per sample, and fat nodes would stream ~2× the bytes. (Every residual node is enabled by construction — the bake skips disabled subtrees.)
Variants§
Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Residual<'a>
impl<'a> RefUnwindSafe for Residual<'a>
impl<'a> Send for Residual<'a>
impl<'a> Sync for Residual<'a>
impl<'a> Unpin for Residual<'a>
impl<'a> UnsafeUnpin for Residual<'a>
impl<'a> UnwindSafe for Residual<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ConditionalSend for Twhere
T: Send,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> TransformedExt for T
impl<T> TransformedExt for T
Source§fn transformed<G>(self, transform: G) -> Transformed<Self, G>
fn transformed<G>(self, transform: G) -> Transformed<Self, G>
Return
self wrapped with transform stored exactly as G.