macro_rules! blockchain {
($g:expr, $prev:ident, $($cons:expr),* $(,)?) => { ... };
}Expand description
Helper macro for creating a series of one-in, one-out blocks and adding them to a graph.
ยงExample
use rustradio::graph::{Graph, GraphRunner};
use rustradio::blocks::*;
use rustradio::blockchain;
let mut g = Graph::new();
let prev = blockchain![
g, // Graph object.
prev, // Variable to use for the streams from block to block.
SignalSourceFloat::new(44100.0, 1000.0, 1.0),
MultiplyConst::new(prev, 2.0),
MultiplyConst::new(prev, 4.0),
];