Struct cubeb_core::DeviceInfoRef
source · pub struct DeviceInfoRef(/* private fields */);
Implementations§
source§impl DeviceInfoRef
impl DeviceInfoRef
sourcepub unsafe fn from_ptr<'a>(ptr: *mut cubeb_device_info) -> &'a Self
pub unsafe fn from_ptr<'a>(ptr: *mut cubeb_device_info) -> &'a Self
Safety
This function is unsafe because it dereferences the given ptr
pointer.
The caller should ensure that pointer is valid.
sourcepub unsafe fn from_ptr_mut<'a>(ptr: *mut cubeb_device_info) -> &'a mut Self
pub unsafe fn from_ptr_mut<'a>(ptr: *mut cubeb_device_info) -> &'a mut Self
Safety
This function is unsafe because it dereferences the given ptr
pointer.
The caller should ensure that pointer is valid.
pub fn as_ptr(&self) -> *mut cubeb_device_info
source§impl DeviceInfoRef
impl DeviceInfoRef
pub fn device_id_bytes(&self) -> Option<&[u8]>
sourcepub fn friendly_name(&self) -> Option<&str>
pub fn friendly_name(&self) -> Option<&str>
Friendly device name which might be presented in a UI.
pub fn friendly_name_bytes(&self) -> Option<&[u8]>
sourcepub fn group_id(&self) -> Option<&str>
pub fn group_id(&self) -> Option<&str>
Two devices have the same group identifier if they belong to the same physical device; for example a headset and microphone.
pub fn group_id_bytes(&self) -> Option<&[u8]>
sourcepub fn vendor_name(&self) -> Option<&str>
pub fn vendor_name(&self) -> Option<&str>
Optional vendor name, may be None.
pub fn vendor_name_bytes(&self) -> Option<&[u8]>
sourcepub fn device_type(&self) -> DeviceType
pub fn device_type(&self) -> DeviceType
Type of device (Input/Output).
sourcepub fn state(&self) -> DeviceState
pub fn state(&self) -> DeviceState
State of device disabled/enabled/unplugged.
sourcepub fn preferred(&self) -> DevicePref
pub fn preferred(&self) -> DevicePref
Preferred device.
sourcepub fn format(&self) -> DeviceFormat
pub fn format(&self) -> DeviceFormat
Sample format supported.
sourcepub fn default_format(&self) -> DeviceFormat
pub fn default_format(&self) -> DeviceFormat
The default sample format for this device.
sourcepub fn max_channels(&self) -> u32
pub fn max_channels(&self) -> u32
Channels.
sourcepub fn default_rate(&self) -> u32
pub fn default_rate(&self) -> u32
Default/Preferred sample rate.
sourcepub fn latency_lo(&self) -> u32
pub fn latency_lo(&self) -> u32
Lowest possible latency in frames.
sourcepub fn latency_hi(&self) -> u32
pub fn latency_hi(&self) -> u32
Higest possible latency in frames.
Trait Implementations§
source§impl AsRef<DeviceInfoRef> for DeviceInfo
impl AsRef<DeviceInfoRef> for DeviceInfo
source§fn as_ref(&self) -> &DeviceInfoRef
fn as_ref(&self) -> &DeviceInfoRef
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Borrow<DeviceInfoRef> for DeviceInfo
impl Borrow<DeviceInfoRef> for DeviceInfo
source§fn borrow(&self) -> &DeviceInfoRef
fn borrow(&self) -> &DeviceInfoRef
Immutably borrows from an owned value. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for DeviceInfoRef
impl Send for DeviceInfoRef
impl !Sync for DeviceInfoRef
impl Unpin for DeviceInfoRef
impl UnwindSafe for DeviceInfoRef
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