pub struct Node(pub Arc<SyncUnsafeCell<dyn DspNode>>, NodeId);
Expand description
A warpper type for DspNode trait objects.
Make sure to call methods on this only from one thread at a time. The common lifetime cycle of this is:
- Instanciation in crate::NodeConfigurator::create_node on eg. the frontend thread
- Sent wrapped in a crate::nodes::NodeProg to the audio/DSP thread.
- DSP thread calls methods on this.
- Upon update of the crate::nodes::NodeProg on the DSP thread it is disposed by being sent to the drop thread.
Tuple Fields
0: Arc<SyncUnsafeCell<dyn DspNode>>
1: NodeId
Implementations
sourceimpl Node
impl Node
pub fn id(&self) -> NodeId
pub fn set_sample_rate(&self, srate: f32)
pub fn reset(&self)
pub fn process(
&self,
ctx: &mut dyn NodeAudioContext,
ectx: &mut NodeExecContext,
nctx: &NodeContext<'_>,
atoms: &[SAtom],
inputs: &[ProcBuf],
outputs: &mut [ProcBuf],
led: LedPhaseVals<'_>
)
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl !UnwindSafe for Node
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more