sound_flow 0.3.0

Execute graphs of functions in real time
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::graph::buffer_address::BufferAddress;
use crate::Node;

#[derive(Debug, Clone)]
pub(crate) struct Instruction<N: Node> {
    pub(crate) node: N,
    pub(crate) socket_inputs: Vec<BufferAddress>,
    pub(crate) socket_outputs: Vec<BufferAddress>,
}

impl<N: Node> Instruction<N> {
    pub(crate) fn output_address(&self, index: usize) -> &BufferAddress {
        &self.socket_outputs[index]
    }
}