sdlIsAudioDevicePlayback function

bool sdlIsAudioDevicePlayback(
  1. int devid
)

Determine if an audio device is a playback device (instead of recording).

This function may return either true or false for invalid device IDs.

\param devid the device ID to query. \returns true if devid is a playback device, false if it is recording.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePlayback(SDL_AudioDeviceID devid)

Implementation

bool sdlIsAudioDevicePlayback(int devid) {
  final sdlIsAudioDevicePlaybackLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Uint32 devid),
      int Function(int devid)>('SDL_IsAudioDevicePlayback');
  return sdlIsAudioDevicePlaybackLookupFunction(devid) == 1;
}