Trait rich_sdl2_rust::audio::AudioDevice
source · 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§
Provided Methods§
sourcefn status(&self) -> AudioStatus
fn status(&self) -> AudioStatus
Returns the status of an audio device.
sourcefn lock(&mut self) -> AudioDeviceLock<'_>
fn lock(&mut self) -> AudioDeviceLock<'_>
Obtains the lock preventing from calling the callback spec::AudioCallback
.