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) -> NodeIndex
pub fn add_mono_node<T>(&mut self, node: T) -> NodeIndex
an alternative to new() specify the estimated max node and edge numbers to avoid dynamic allocation
pub fn add_stereo_node<T>(&mut self, node: T) -> NodeIndex
pub fn add_multi_chan_node<T>(&mut self, chan: usize, node: T) -> NodeIndex
pub fn connect(&mut self, from: NodeIndex, to: NodeIndex) -> EdgeIndex
pub fn connect_with_order( &mut self, from: NodeIndex, to: NodeIndex, pos: usize ) -> EdgeIndex
pub fn chain(&mut self, chain: Vec<NodeIndex>) -> Vec<EdgeIndex>
pub fn chain_boxed( &mut self, chain: Vec<GlicolNodeData<N>> ) -> (Vec<NodeIndex>, Vec<EdgeIndex>)
pub fn add_node_chain( &mut self, chain: Vec<NodeData<BoxedNodeSend<N>, N>> ) -> (Vec<NodeIndex>, Vec<EdgeIndex>)
pub fn next_block(&mut self) -> &[Buffer<N>]
pub fn send_msg(&mut self, index: NodeIndex, msg: Message)
pub fn send_msg_to_all(&mut self, msg: Message)
Auto Trait Implementations§
impl<const N: usize> Freeze for AudioContext<N>
impl<const N: usize> !RefUnwindSafe for AudioContext<N>
impl<const N: usize> Send for AudioContext<N>
impl<const N: usize> !Sync for AudioContext<N>
impl<const N: usize> Unpin for AudioContext<N>
impl<const N: usize> !UnwindSafe for AudioContext<N>
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