Struct glicol_synth::AudioContext
source · pub struct AudioContext<const N: usize> {
pub input: NodeIndex,
pub destination: NodeIndex,
pub tags: HashMap<&'static str, NodeIndex>,
pub graph: GlicolGraph<N>,
pub processor: GlicolProcessor<N>,
/* private fields */
}
Expand description
The audio context that holds a destination and the graph connection
Fields§
§input: NodeIndex
§destination: NodeIndex
§graph: GlicolGraph<N>
§processor: GlicolProcessor<N>
Implementations§
source§impl<const N: usize> AudioContext<N>
impl<const N: usize> AudioContext<N>
pub fn new(config: AudioContextConfig) -> Self
pub fn reset(&mut self)
sourcepub fn add_mono_node<T>(&mut self, node: T) -> NodeIndexwhere
T: Node<N> + Send + 'static,
pub fn add_mono_node<T>(&mut self, node: T) -> NodeIndexwhere T: Node<N> + Send + 'static,
an alternative to new() specify the estimated max node and edge numbers to avoid dynamic allocation