pub struct Scheduler {
pub graph: DspGraph,
pub sample_rate: f32,
pub muted: bool,
}Expand description
The RT scheduler. Owns the graph and processes audio callbacks.
Fields§
§graph: DspGraph§sample_rate: f32§muted: boolImplementations§
Source§impl Scheduler
impl Scheduler
pub fn new(sample_rate: f32) -> Self
Sourcepub fn process_block<C>(&mut self, cmd_consumer: &mut C, output: &mut [f32])
pub fn process_block<C>(&mut self, cmd_consumer: &mut C, output: &mut [f32])
Called once per audio callback from the CPAL stream.
Sourcepub fn process_block_simple(&mut self, output: &mut [f32])
pub fn process_block_simple(&mut self, output: &mut [f32])
Simplified process block — no ring buffer. Used when the scheduler is shared via Arc<Mutex<>> and the control thread mutates it directly. The audio thread calls this after acquiring try_lock().
Auto Trait Implementations§
impl Freeze for Scheduler
impl !RefUnwindSafe for Scheduler
impl Send for Scheduler
impl !Sync for Scheduler
impl Unpin for Scheduler
impl UnsafeUnpin for Scheduler
impl !UnwindSafe for Scheduler
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more