pub struct SystemClock {
pub sample_rate: f32,
/* private fields */
}Expand description
High-precision system clock
Provides sample-accurate timing for signal processing. Uses atomic operations for thread safety without locks.
Fields§
§sample_rate: f32Implementations§
Source§impl SystemClock
impl SystemClock
Sourcepub fn new(sample_rate: f32, initial_bpm: f64) -> SystemClock
pub fn new(sample_rate: f32, initial_bpm: f64) -> SystemClock
Create a new system clock
Sourcepub fn with_sample_rate(sample_rate: f32) -> SystemClock
pub fn with_sample_rate(sample_rate: f32) -> SystemClock
Create a clock with default BPM (120)
Trait Implementations§
Source§impl ClockSource for SystemClock
impl ClockSource for SystemClock
Source§fn sample_rate(&self) -> f32
fn sample_rate(&self) -> f32
Get the sample rate of this clock source
Source§fn is_running(&self) -> bool
fn is_running(&self) -> bool
Check if the clock is running
Source§fn current_position(&self) -> u64
fn current_position(&self) -> u64
Get the current sample position Read more
Auto Trait Implementations§
impl !Freeze for SystemClock
impl RefUnwindSafe for SystemClock
impl Send for SystemClock
impl Sync for SystemClock
impl Unpin for SystemClock
impl UnsafeUnpin for SystemClock
impl UnwindSafe for SystemClock
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