#[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: Uint8👎Deprecated: padding fields are exempt from semver; init with
§..Default::default()padding2: Uint8👎Deprecated: padding fields are exempt from semver; init with
§..Default::default()padding3: Uint8👎Deprecated: padding 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
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 SDL_AudioDeviceEvent
impl Debug for SDL_AudioDeviceEvent
Source§impl Default for SDL_AudioDeviceEvent
impl Default for SDL_AudioDeviceEvent
Source§fn default() -> SDL_AudioDeviceEvent
fn default() -> SDL_AudioDeviceEvent
Returns the “default value” for a type. Read more
Source§impl Hash for SDL_AudioDeviceEvent
impl Hash for SDL_AudioDeviceEvent
Source§impl PartialEq for SDL_AudioDeviceEvent
impl PartialEq for SDL_AudioDeviceEvent
impl Copy for SDL_AudioDeviceEvent
impl Eq for SDL_AudioDeviceEvent
impl StructuralPartialEq for SDL_AudioDeviceEvent
Auto Trait Implementations§
impl Freeze for SDL_AudioDeviceEvent
impl RefUnwindSafe for SDL_AudioDeviceEvent
impl Send for SDL_AudioDeviceEvent
impl Sync for SDL_AudioDeviceEvent
impl Unpin for SDL_AudioDeviceEvent
impl UnwindSafe for SDL_AudioDeviceEvent
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