Struct sbz_switch::media::DeviceEnumerator
source · [−]pub struct DeviceEnumerator(_, _);
Expand description
Provides access to the devices available in the current Windows session.
Implementations
sourceimpl DeviceEnumerator
impl DeviceEnumerator
sourcepub fn with_logger(logger: Logger) -> Result<Self, Win32Error>
pub fn with_logger(logger: Logger) -> Result<Self, Win32Error>
Creates a new device enumerator with the provided logger.
sourcepub fn get_active_audio_endpoints(&self) -> Result<Vec<Endpoint>, Win32Error>
pub fn get_active_audio_endpoints(&self) -> Result<Vec<Endpoint>, Win32Error>
Gets all active audio outputs.
sourcepub fn get_default_audio_endpoint(&self) -> Result<Endpoint, Win32Error>
pub fn get_default_audio_endpoint(&self) -> Result<Endpoint, Win32Error>
Gets the default audio output.
There are multiple default audio outputs in Windows. This function gets the device that would be used if the current application were to play music or sound effects (as opposed to VOIP audio).
sourcepub fn get_endpoint(&self, id: &OsStr) -> Result<Endpoint, Win32Error>
pub fn get_endpoint(&self, id: &OsStr) -> Result<Endpoint, Win32Error>
Get a specific audio endpoint by its ID.
Auto Trait Implementations
impl RefUnwindSafe for DeviceEnumerator
impl !Send for DeviceEnumerator
impl !Sync for DeviceEnumerator
impl Unpin for DeviceEnumerator
impl UnwindSafe for DeviceEnumerator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more