pub struct DelayLine { /* private fields */ }Implementations§
Source§impl DelayLine
impl DelayLine
Sourcepub fn new(max_delay_samples: usize) -> Self
pub fn new(max_delay_samples: usize) -> Self
Membuat DelayLine baru dengan delay maksimum dalam sample.
Sourcepub fn read_delay(&self, delay_samples: f32, interp: InterpolationType) -> f32
pub fn read_delay(&self, delay_samples: f32, interp: InterpolationType) -> f32
Membaca sinyal tertunda relatif terhadap sampel terakhir yang di-push.
delay_samples = 1.0 berarti x[n - 1] bila x[n] adalah sampel yang
terakhir di-push.
Sourcepub fn read_delay_before_push(
&self,
delay_samples: f32,
interp: InterpolationType,
) -> f32
pub fn read_delay_before_push( &self, delay_samples: f32, interp: InterpolationType, ) -> f32
Varian untuk pembaca yang membaca sebelum push (mis. efek feedback
yang perlu nilai tertunda untuk menghitung input berikutnya).
Hasilnya setara dengan read_delay(delay_samples) setelah sampel baru
di-push; pembaca menghitung satu langkah lebih muda, bukan menebak posisi.
Sourcepub fn process_sample(
&mut self,
input: f32,
delay_samples: f32,
interp: InterpolationType,
) -> f32
pub fn process_sample( &mut self, input: f32, delay_samples: f32, interp: InterpolationType, ) -> f32
Memproses satu sample: push input lalu kembalikan output delay.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DelayLine
impl RefUnwindSafe for DelayLine
impl Send for DelayLine
impl Sync for DelayLine
impl Unpin for DelayLine
impl UnsafeUnpin for DelayLine
impl UnwindSafe for DelayLine
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