Struct lsynth::ChipParameters
source · [−]pub struct ChipParameters { /* private fields */ }
Expand description
Parameters detailing how an LSynth chip is intended to operate.
Implementations
sourceimpl ChipParameters
impl ChipParameters
sourcepub fn new(samplerate: usize, amplitude: f32, tick_rate: f32) -> ChipParameters
pub fn new(samplerate: usize, amplitude: f32, tick_rate: f32) -> ChipParameters
Creates a new set of chip parameters. Tick rate is ticks per second.
sourcepub fn set_sample_rate(&mut self, samplerate: usize)
pub fn set_sample_rate(&mut self, samplerate: usize)
Sets the samplerate of the chip in hertz.
sourcepub fn set_tick_rate(&mut self, tick_rate: f32)
pub fn set_tick_rate(&mut self, tick_rate: f32)
Sets the tick rate of the chip in hertz.
sourcepub fn get_tick_frames(&self) -> f32
pub fn get_tick_frames(&self) -> f32
Returns the number of samples in a single tick.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ChipParameters
impl<'de> Deserialize<'de> for ChipParameters
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for ChipParameters
impl Serialize for ChipParameters
Auto Trait Implementations
impl RefUnwindSafe for ChipParameters
impl Send for ChipParameters
impl Sync for ChipParameters
impl Unpin for ChipParameters
impl UnwindSafe for ChipParameters
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more