Skip to main content

Chain

Macro Chain 

Source
macro_rules! Chain {
    ($single:ty) => { ... };
    ($first:ty, $($rest:ty),+ $(,)?) => { ... };
}
Expand description

Combines processors into a serial chain.

Single processor optimization:

use wavecraft_dsp::builtins::GainDsp;
use wavecraft_dsp::Chain;

type Single = Chain![GainDsp]; // Compiles to just `GainDsp`, no wrapper overhead

Multiple processors:

use wavecraft_dsp::builtins::{GainDsp, PassthroughDsp};
use wavecraft_dsp::Chain;

type Multiple = Chain![GainDsp, PassthroughDsp];