pub struct SamplePlayerNode<T: Transcendental, const BUF_SIZE: usize> { /* private fields */ }Expand description
Sample playback node with stereo support, looping, and playback rate control.
Implementations§
Source§impl<T: Transcendental, const BUF_SIZE: usize> SamplePlayerNode<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> SamplePlayerNode<T, BUF_SIZE>
Sourcepub fn load(&mut self, sample: SampleBuffer<T>)
pub fn load(&mut self, sample: SampleBuffer<T>)
Loads a sample buffer for playback.
Sourcepub fn set_amplitude(&mut self, amp: T)
pub fn set_amplitude(&mut self, amp: T)
Sets output amplitude (clamped to 0.0–1.0).
Trait Implementations§
Source§impl<T: Transcendental, const BUF_SIZE: usize> Algorithm<T> for SamplePlayerNode<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> Algorithm<T> for SamplePlayerNode<T, BUF_SIZE>
Source§fn process(
&mut self,
_input: Option<&[T]>,
output: &mut [T],
) -> ProcessResult<()>
fn process( &mut self, _input: Option<&[T]>, output: &mut [T], ) -> ProcessResult<()>
Process one block of signal. Read more
Source§fn metadata(&self) -> AlgorithmMetadata
fn metadata(&self) -> AlgorithmMetadata
Descriptive metadata (defaults to empty).
Source§fn apply_command(&mut self, _value: T)
fn apply_command(&mut self, _value: T)
Receive a real-time command value from the control path. Read more
Source§impl<T: Transcendental, const BUF_SIZE: usize> Default for SamplePlayerNode<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> Default for SamplePlayerNode<T, BUF_SIZE>
Auto Trait Implementations§
impl<T, const BUF_SIZE: usize> Freeze for SamplePlayerNode<T, BUF_SIZE>where
T: Freeze,
impl<T, const BUF_SIZE: usize> RefUnwindSafe for SamplePlayerNode<T, BUF_SIZE>where
T: RefUnwindSafe,
impl<T, const BUF_SIZE: usize> Send for SamplePlayerNode<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Sync for SamplePlayerNode<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Unpin for SamplePlayerNode<T, BUF_SIZE>where
T: Unpin,
impl<T, const BUF_SIZE: usize> UnsafeUnpin for SamplePlayerNode<T, BUF_SIZE>where
T: UnsafeUnpin,
impl<T, const BUF_SIZE: usize> UnwindSafe for SamplePlayerNode<T, BUF_SIZE>where
T: UnwindSafe,
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