#[repr(C)]pub struct SDL_AudioDeviceEvent {
pub type: SDL_EventType,
pub reserved: Uint32,
pub timestamp: Uint64,
pub which: SDL_AudioDeviceID,
pub recording: bool,
pub padding1: Uint8,
pub padding2: Uint8,
pub padding3: Uint8,
}Expand description
Audio device event structure (event.adevice.*)
Note that SDL will send a SDL_EVENT_AUDIO_DEVICE_ADDED event for every
device it discovers during initialization. After that, this event will only
arrive when a device is hotplugged during the program’s run.
§Availability
This struct is available since SDL 3.2.0.
§Notes for sdl3-sys
This struct has padding fields which shouldn’t be accessed directly; use struct update syntax with e.g. ..Default::default() for manual construction.
Fields§
§type: SDL_EventTypeSDL_EVENT_AUDIO_DEVICE_ADDED, or SDL_EVENT_AUDIO_DEVICE_REMOVED, or SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED
reserved: Uint32§timestamp: Uint64In nanoseconds, populated using SDL_GetTicksNS()
which: SDL_AudioDeviceIDSDL_AudioDeviceID for the device being added or removed or changing
recording: boolfalse if a playback device, true if a recording device.
padding1: Uint8padding fields are exempt from semver; init with ..Default::default()
padding2: Uint8padding fields are exempt from semver; init with ..Default::default()
padding3: Uint8padding fields are exempt from semver; init with ..Default::default()
Trait Implementations§
Source§impl Clone for SDL_AudioDeviceEvent
impl Clone for SDL_AudioDeviceEvent
Source§fn clone(&self) -> SDL_AudioDeviceEvent
fn clone(&self) -> SDL_AudioDeviceEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more