pub struct ManualSource { /* private fields */ }Expand description
A source with no device: ManualSource::push hands a block to the running capture function.
Implementations§
Trait Implementations§
Source§impl AudioSource for ManualSource
impl AudioSource for ManualSource
Source§fn default_config(&self) -> Result<SinkConfig, SinkError>
fn default_config(&self) -> Result<SinkConfig, SinkError>
The device’s preferred configuration.
Source§fn start(
&mut self,
config: SinkConfig,
capture: CaptureFn,
) -> Result<SinkHandle, SinkError>
fn start( &mut self, config: SinkConfig, capture: CaptureFn, ) -> Result<SinkHandle, SinkError>
Start capturing with exactly
config, calling capture with each block. Capture stops when the handle is dropped.Source§impl Clone for ManualSource
impl Clone for ManualSource
Auto Trait Implementations§
impl Forget for ManualSource
impl Freeze for ManualSource
impl Move for ManualSource
impl RefUnwindSafe for ManualSourcewhere
Atomic<usize>: RefUnwindSafe,
Mutex<Option<(SinkConfig, Box<dyn FnMut(&[f32]) + Send>)>>: RefUnwindSafe,
Atomic<u64>: RefUnwindSafe,
impl Send for ManualSource
impl Sync for ManualSource
impl Unpin for ManualSource
impl UnsafeUnpin for ManualSourcewhere
*const ArcInner<Mutex<Option<(SinkConfig, Box<dyn FnMut(&[f32]) + Send>)>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Option<(SinkConfig, Box<dyn FnMut(&[f32]) + Send>)>>>>: UnsafeUnpin,
*const ArcInner<Atomic<u64>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<u64>>>: UnsafeUnpin,
impl UnwindSafe for ManualSourcewhere
Arc<Mutex<Option<(SinkConfig, Box<dyn FnMut(&[f32]) + Send>)>>>: UnwindSafe,
Arc<Atomic<u64>>: UnwindSafe,
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