SDL_AudioDeviceEvent Struct Reference

`#include <SDL_events.h>`

## Data Fields

SDL_EventType | type
Uint32 | reserved
Uint64 | timestamp
SDL_AudioDeviceID | which
bool | recording
Uint8 | padding1
Uint8 | padding2
Uint8 | padding3

## Detailed 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.

Since
  This struct is available since SDL 3.2.0.

Definition at line 722 of file SDL_events.h.

## Field Documentation

## padding1

Uint8 SDL_AudioDeviceEvent::padding1

Definition at line 729 of file SDL_events.h.

## padding2

Uint8 SDL_AudioDeviceEvent::padding2

Definition at line 730 of file SDL_events.h.

## padding3

Uint8 SDL_AudioDeviceEvent::padding3

Definition at line 731 of file SDL_events.h.

## recording

bool SDL_AudioDeviceEvent::recording

false if a playback device, true if a recording device.

Definition at line 728 of file SDL_events.h.

## reserved

Uint32 SDL_AudioDeviceEvent::reserved

Definition at line 725 of file SDL_events.h.

## timestamp

Uint64 SDL_AudioDeviceEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 726 of file SDL_events.h.

## type

SDL_EventType SDL_AudioDeviceEvent::type

SDL_EVENT_AUDIO_DEVICE_ADDED, or SDL_EVENT_AUDIO_DEVICE_REMOVED, or SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED

Definition at line 724 of file SDL_events.h.

## which

SDL_AudioDeviceID SDL_AudioDeviceEvent::which

SDL_AudioDeviceID for the device being added or removed or changing

Definition at line 727 of file SDL_events.h.

The documentation for this struct was generated from the following file:

- SDL_events.h