pub struct AlsaCaptureBridge { /* private fields */ }Expand description
Converts ALSA capture buffers into PCM stream packets.
Implementations§
Source§impl AlsaCaptureBridge
impl AlsaCaptureBridge
Sourcepub fn new(queue: HostCallbackQueue, spec: PcmSpec) -> Self
pub fn new(queue: HostCallbackQueue, spec: PcmSpec) -> Self
Builds a capture bridge that pushes packets onto queue in spec.
Sourcepub fn capture_interleaved_f32(&self, samples: &[f32]) -> Result<PushResult>
pub fn capture_interleaved_f32(&self, samples: &[f32]) -> Result<PushResult>
Captures interleaved F32 samples into a PCM packet on the queue.
The sample count must be a multiple of the spec’s channel count. The
packet is encoded in the spec’s sample format (F32 directly, or I16 by
conversion). Returns the queue’s PushResult.
Sourcepub fn capture_interleaved_i16(&self, samples: &[i16]) -> Result<PushResult>
pub fn capture_interleaved_i16(&self, samples: &[i16]) -> Result<PushResult>
Captures interleaved I16 samples into a PCM packet on the queue.
The sample count must be a multiple of the spec’s channel count. The
packet is encoded in the spec’s sample format (I16 directly, or F32 by
conversion). Returns the queue’s PushResult.
Trait Implementations§
Source§impl Clone for AlsaCaptureBridge
impl Clone for AlsaCaptureBridge
Source§fn clone(&self) -> AlsaCaptureBridge
fn clone(&self) -> AlsaCaptureBridge
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AlsaCaptureBridge
impl RefUnwindSafe for AlsaCaptureBridge
impl Send for AlsaCaptureBridge
impl Sync for AlsaCaptureBridge
impl Unpin for AlsaCaptureBridge
impl UnsafeUnpin for AlsaCaptureBridge
impl UnwindSafe for AlsaCaptureBridge
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