Struct augmented_oscillator::Oscillator
source · pub struct Oscillator<T> { /* private fields */ }
Implementations§
source§impl Oscillator<f32>
impl Oscillator<f32>
sourcepub fn sine(sample_rate: f32) -> Oscillator<f32>
pub fn sine(sample_rate: f32) -> Oscillator<f32>
Construct a sine generator
source§impl<T> Oscillator<T>
impl<T> Oscillator<T>
source§impl<T> Oscillator<T>
impl<T> Oscillator<T>
sourcepub fn set_generator(&mut self, generator_fn: fn(_: T) -> T)
pub fn set_generator(&mut self, generator_fn: fn(_: T) -> T)
Set the generator function
source§impl<T> Oscillator<T>
impl<T> Oscillator<T>
sourcepub fn set_sample_rate(&mut self, sample_rate: f32)
pub fn set_sample_rate(&mut self, sample_rate: f32)
Set the sample rate
source§impl<T> Oscillator<T>
impl<T> Oscillator<T>
sourcepub fn get_frequency(&self) -> f32
pub fn get_frequency(&self) -> f32
Get the oscillator frequency
sourcepub fn set_frequency(&mut self, frequency: f32)
pub fn set_frequency(&mut self, frequency: f32)
Set the oscillator frequency
source§impl<T> Oscillator<T>
impl<T> Oscillator<T>
Trait Implementations§
source§impl<T: Clone> Clone for Oscillator<T>
impl<T: Clone> Clone for Oscillator<T>
source§fn clone(&self) -> Oscillator<T>
fn clone(&self) -> Oscillator<T>
Returns a copy 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 moreAuto Trait Implementations§
impl<T> RefUnwindSafe for Oscillator<T>
impl<T> Send for Oscillator<T>
impl<T> Sync for Oscillator<T>
impl<T> Unpin for Oscillator<T>
impl<T> UnwindSafe for Oscillator<T>
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