pub trait AudioDevice {
    // Required method
    fn id(&self) -> u32;

    // Provided methods
    fn status(&self) -> AudioStatus { ... }
    fn lock(&mut self) -> AudioDeviceLock<'_> { ... }
}
Expand description

Common methods for an audio device, such as a speaker and a microphone.

Required Methods§

source

fn id(&self) -> u32

Returns the id of an audio device.

Provided Methods§

source

fn status(&self) -> AudioStatus

Returns the status of an audio device.

source

fn lock(&mut self) -> AudioDeviceLock<'_>

Obtains the lock preventing from calling the callback spec::AudioCallback.

Implementors§