pub struct DeviceInfo {
pub id: DeviceID,
pub output_channels: u32,
pub input_channels: u32,
pub duplex_channels: u32,
pub is_default_output: bool,
pub is_default_input: bool,
pub native_formats: NativeFormats,
pub preferred_sample_rate: u32,
pub sample_rates: Vec<u32>,
}Expand description
Queried information about a device.
Fields§
§id: DeviceIDThe unique identifier of this device.
output_channels: u32The number of output channels on this device.
input_channels: u32The number of input channels on this device.
duplex_channels: u32The number of duplex channels on this device.
is_default_output: boolWhether or not this device is the default output device.
is_default_input: boolWhether or not this device is the default input device.
native_formats: NativeFormatsThe native sample formats that this device supports. (bitflags)
Note you can still start a stream with any format. RtAudio will just automatically convert to/from the best native format.
preferred_sample_rate: u32The device’s preferred sample rate.
sample_rates: Vec<u32>The available sample rates for this device.
Implementations§
Source§impl DeviceInfo
impl DeviceInfo
Trait Implementations§
Source§impl Clone for DeviceInfo
impl Clone for DeviceInfo
Source§fn clone(&self) -> DeviceInfo
fn clone(&self) -> DeviceInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceInfo
impl Debug for DeviceInfo
Source§impl PartialEq for DeviceInfo
impl PartialEq for DeviceInfo
impl StructuralPartialEq for DeviceInfo
Auto Trait Implementations§
impl Freeze for DeviceInfo
impl RefUnwindSafe for DeviceInfo
impl Send for DeviceInfo
impl Sync for DeviceInfo
impl Unpin for DeviceInfo
impl UnwindSafe for DeviceInfo
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