pub struct AudioOutputDevice { /* private fields */ }
Available on crate feature
media
only.Expand description
A representation of a windows audio output device.
Implementations§
Source§impl AudioOutputDevice
impl AudioOutputDevice
Sourcepub fn get_active_devices() -> Result<Vec<Self>>
pub fn get_active_devices() -> Result<Vec<Self>>
Returns all devices that are active (currently plugged in)
Sourcepub fn get_friendly_name(&self) -> &str
pub fn get_friendly_name(&self) -> &str
Returns a friendly name usable for humans to identify the device.
Sourcepub fn get_global_default() -> Result<Self>
pub fn get_global_default() -> Result<Self>
Returns the current global default audio output device set in the audio settings.
Sourcepub fn set_global_default(&self) -> Result<()>
pub fn set_global_default(&self) -> Result<()>
Sets the device as the new default global output device.
Trait Implementations§
Source§impl Clone for AudioOutputDevice
impl Clone for AudioOutputDevice
Source§fn clone(&self) -> AudioOutputDevice
fn clone(&self) -> AudioOutputDevice
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 AudioOutputDevice
impl Debug for AudioOutputDevice
Source§impl PartialEq for AudioOutputDevice
impl PartialEq for AudioOutputDevice
Source§impl TryFrom<IMMDevice> for AudioOutputDevice
impl TryFrom<IMMDevice> for AudioOutputDevice
impl Eq for AudioOutputDevice
Auto Trait Implementations§
impl Freeze for AudioOutputDevice
impl RefUnwindSafe for AudioOutputDevice
impl Send for AudioOutputDevice
impl Sync for AudioOutputDevice
impl Unpin for AudioOutputDevice
impl UnwindSafe for AudioOutputDevice
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