pub struct AudioDevAndCfg { /* private fields */ }
Expand description
Describes the audio input device that should be used and the config for the input stream. Caller must be certain, that the config works for the given device on the current platform.
Implementations§
Source§impl AudioDevAndCfg
impl AudioDevAndCfg
Sourcepub fn new(
preferred_dev: Option<Device>,
preferred_cfg: Option<StreamConfig>,
) -> Self
pub fn new( preferred_dev: Option<Device>, preferred_cfg: Option<StreamConfig>, ) -> Self
Creates an instance. If no device is passed, it falls back to the default input device of the system.
Sourcepub const fn cfg(&self) -> &StreamConfig
pub const fn cfg(&self) -> &StreamConfig
Getter for audio input stream config.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioDevAndCfg
impl RefUnwindSafe for AudioDevAndCfg
impl Send for AudioDevAndCfg
impl Sync for AudioDevAndCfg
impl Unpin for AudioDevAndCfg
impl UnwindSafe for AudioDevAndCfg
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