pub struct AudioDeviceSetup(/* private fields */);Expand description
The properties of an audio device.
Implementations§
Source§impl AudioDeviceSetup
impl AudioDeviceSetup
Sourcepub fn output_device_name(&self) -> &str
pub fn output_device_name(&self) -> &str
The name of the output device.
Sourcepub fn with_output_device_name(self, name: impl AsRef<str>) -> Self
pub fn with_output_device_name(self, name: impl AsRef<str>) -> Self
Set the name of the output device.
Sourcepub fn input_device_name(&self) -> &str
pub fn input_device_name(&self) -> &str
The name of the input device.
Sourcepub fn with_input_device_name(self, name: impl AsRef<str>) -> Self
pub fn with_input_device_name(self, name: impl AsRef<str>) -> Self
Set the name of the input device.
Sourcepub fn sample_rate(&self) -> f64
pub fn sample_rate(&self) -> f64
The sample rate in Hertz.
Sourcepub fn with_sample_rate(self, sample_rate: f64) -> Self
pub fn with_sample_rate(self, sample_rate: f64) -> Self
Set the sample rate in Hertz.
Sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
The buffer size.
Sourcepub fn with_buffer_size(self, buffer_size: usize) -> Self
pub fn with_buffer_size(self, buffer_size: usize) -> Self
The buffer size to use.
Sourcepub fn input_channels(&self) -> ChannelCount
pub fn input_channels(&self) -> ChannelCount
The number of input channels.
pub fn with_input_channels(self, channels: ChannelCount) -> Self
Sourcepub fn output_channels(&self) -> ChannelCount
pub fn output_channels(&self) -> ChannelCount
The number of output channels.
Sourcepub fn with_output_channels(self, channels: ChannelCount) -> Self
pub fn with_output_channels(self, channels: ChannelCount) -> Self
Set the number of output channels.
Trait Implementations§
Source§impl Default for AudioDeviceSetup
impl Default for AudioDeviceSetup
impl Send for AudioDeviceSetup
Auto Trait Implementations§
impl Freeze for AudioDeviceSetup
impl RefUnwindSafe for AudioDeviceSetup
impl !Sync for AudioDeviceSetup
impl Unpin for AudioDeviceSetup
impl UnwindSafe for AudioDeviceSetup
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