pub struct DefaultMixBus { /* private fields */ }Expand description
Mutex-backed ringbuffer impl of AudioMixBus.
Lives in khora-core so apps and tests can construct one without
pulling khora-infra. Performance is adequate for early development;
migration to a lock-free queue is a follow-up PR.
Implementations§
Source§impl DefaultMixBus
impl DefaultMixBus
Sourcepub fn new(info: StreamInfo, capacity_frames: usize) -> Self
pub fn new(info: StreamInfo, capacity_frames: usize) -> Self
capacity_frames is the high-water mark in frames (not samples).
Samples beyond that are dropped from the head — newest wins.
Trait Implementations§
Source§impl AudioMixBus for DefaultMixBus
impl AudioMixBus for DefaultMixBus
Source§fn stream_info(&self) -> StreamInfo
fn stream_info(&self) -> StreamInfo
Channel count and sample rate negotiated with the device. Read more
Source§fn write_block(&self, samples: &[f32])
fn write_block(&self, samples: &[f32])
Push interleaved PCM samples produced by an audio lane. Read more
Auto Trait Implementations§
impl !Freeze for DefaultMixBus
impl RefUnwindSafe for DefaultMixBus
impl Send for DefaultMixBus
impl Sync for DefaultMixBus
impl Unpin for DefaultMixBus
impl UnsafeUnpin for DefaultMixBus
impl UnwindSafe for DefaultMixBus
Blanket Implementations§
Source§impl<T> AppLifecycle for Twhere
T: ?Sized,
impl<T> AppLifecycle for Twhere
T: ?Sized,
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