Struct nannou_audio::device::Device
source · pub struct Device { /* private fields */ }
Expand description
A device that can be used to spawn an audio stream.
Implementations§
source§impl Device
impl Device
sourcepub fn name(&self) -> Result<String, DeviceNameError>
pub fn name(&self) -> Result<String, DeviceNameError>
The unique name associated with this device.
sourcepub fn supported_input_configs(
&self
) -> Result<SupportedInputConfigs, SupportedStreamConfigsError>
pub fn supported_input_configs( &self ) -> Result<SupportedInputConfigs, SupportedStreamConfigsError>
An iterator yielding formats that are supported by the backend.
Can return an error if the device is no longer valid (e.g. it has been disconnected).
sourcepub fn supported_output_configs(
&self
) -> Result<SupportedOutputConfigs, SupportedStreamConfigsError>
pub fn supported_output_configs( &self ) -> Result<SupportedOutputConfigs, SupportedStreamConfigsError>
An iterator yielding configs that are supported by the backend.
Can return an error if the device is no longer valid (e.g. it has been disconnected).
sourcepub fn default_input_config(
&self
) -> Result<SupportedStreamConfig, DefaultStreamConfigError>
pub fn default_input_config( &self ) -> Result<SupportedStreamConfig, DefaultStreamConfigError>
The default config used for input streams.
sourcepub fn default_output_config(
&self
) -> Result<SupportedStreamConfig, DefaultStreamConfigError>
pub fn default_output_config( &self ) -> Result<SupportedStreamConfig, DefaultStreamConfigError>
The default config used for output streams.
sourcepub fn max_supported_output_channels(&self) -> usize
pub fn max_supported_output_channels(&self) -> usize
The maximum number of output channels of any format supported by this device.
sourcepub fn max_supported_input_channels(&self) -> usize
pub fn max_supported_input_channels(&self) -> usize
The maximum number of input channels of any format supported by this device.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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