pub struct HostDevice {
pub output: Option<OutputDevice>,
pub input: Option<InputDevice>,
}
Expand description
The host’s audio input and output devices.
Fields§
§output: Option<OutputDevice>
The output device of the host.
input: Option<InputDevice>
The input device of the host.
Implementations§
Source§impl HostDevice
impl HostDevice
Sourcepub fn new(output: Option<Device>, input: Option<Device>) -> Self
pub fn new(output: Option<Device>, input: Option<Device>) -> Self
Creates a new [AudioDevice
] instance.
Sourcepub fn get_input_config(
&self,
) -> Option<Result<SupportedStreamConfig, DefaultStreamConfigError>>
pub fn get_input_config( &self, ) -> Option<Result<SupportedStreamConfig, DefaultStreamConfigError>>
Gets the input
device’s default configuration
Sourcepub fn get_output_config(
&self,
) -> Option<Result<SupportedStreamConfig, DefaultStreamConfigError>>
pub fn get_output_config( &self, ) -> Option<Result<SupportedStreamConfig, DefaultStreamConfigError>>
Gets the output
device’s default configuration
Auto Trait Implementations§
impl Freeze for HostDevice
impl RefUnwindSafe for HostDevice
impl Send for HostDevice
impl Sync for HostDevice
impl Unpin for HostDevice
impl UnwindSafe for HostDevice
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
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more