pub struct MaxBufferSize(pub usize);Expand description
Maximum buffer size in samples.
Use for plugins that need to pre-allocate processing buffers, like FFT-based processors or lookahead limiters.
§Example
ⓘ
impl Descriptor for FftPlugin {
type Setup = (SampleRate, MaxBufferSize);
fn prepare(self, (sr, mbs): (SampleRate, MaxBufferSize)) -> FftProcessor {
FftProcessor {
sample_rate: sr.0,
fft_buffer: vec![0.0; mbs.0],
}
}
}Tuple Fields§
§0: usizeTrait Implementations§
Source§impl Clone for MaxBufferSize
impl Clone for MaxBufferSize
Source§fn clone(&self) -> MaxBufferSize
fn clone(&self) -> MaxBufferSize
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MaxBufferSize
impl Debug for MaxBufferSize
Source§impl PartialEq for MaxBufferSize
impl PartialEq for MaxBufferSize
Source§impl PluginSetup for MaxBufferSize
impl PluginSetup for MaxBufferSize
impl Copy for MaxBufferSize
impl StructuralPartialEq for MaxBufferSize
Auto Trait Implementations§
impl Freeze for MaxBufferSize
impl RefUnwindSafe for MaxBufferSize
impl Send for MaxBufferSize
impl Sync for MaxBufferSize
impl Unpin for MaxBufferSize
impl UnwindSafe for MaxBufferSize
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