#[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.
Available Since: This struct is available since SDL 3.2.0.
Fields§
§type_: SDL_EventType< SDL_EVENT_AUDIO_DEVICE_ADDED, or SDL_EVENT_AUDIO_DEVICE_REMOVED, or SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED
reserved: Uint32§timestamp: Uint64< In nanoseconds, populated using SDL_GetTicksNS()
which: SDL_AudioDeviceID< SDL_AudioDeviceID for the device being added or removed or changing
recording: bool< false if a playback device, true if a recording device.
padding1: Uint8§padding2: Uint8§padding3: Uint8Trait 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§impl Hash for SDL_AudioDeviceEvent
impl Hash for SDL_AudioDeviceEvent
impl Copy 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 UnsafeUnpin 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