[][src]Struct wavy::Microphone

pub struct Microphone<C: Channel + Unpin> { /* fields omitted */ }

Record audio samples from a microphone.

Implementations

impl<C: Channel + Unpin + From<Ch16>> Microphone<C>[src]

pub fn new() -> Option<Self>[src]

Connect to a microphone. Unlike Speakers, you may call this multiple times to connect to multiple devices.

pub fn sample_rate(&self) -> u32[src]

Get the microphone's sample rate.

pub async fn record<'_, '_>(&'_ mut self) -> impl Stream<Sample1<C>> + '_[src]

Record audio from connected microphone. Returns new audio frames as an Audio buffer in the requested format.

Auto Trait Implementations

impl<C> RefUnwindSafe for Microphone<C> where
    C: RefUnwindSafe

impl<C> !Send for Microphone<C>

impl<C> !Sync for Microphone<C>

impl<C> Unpin for Microphone<C>

impl<C> UnwindSafe for Microphone<C> where
    C: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.