SDL_IsAudioDevicePlayback(3)

SDL_IsAudioDevicePlayback πŸŽ€πŸ¦‹

hiii bestie!! welcome to the SDL3 FUNCTIONS corner of the manual. this page is all about one tiny but iconic question: is this audio device a playback device, or is it out here recording? let's get into it πŸ’–


✨ NAME ✨

SDL_IsAudioDevicePlayback β€” determine if an audio device is a playback device (instead of recording). periodt.


✨ SYNOPSIS ✨

#include <SDL3/SDL_audio.h>

bool SDL_IsAudioDevicePlayback(SDL_AudioDeviceID devid);

✨ DESCRIPTION ✨

okay so real talk: this function may return either true or false for invalid device IDs. no cap, that's just the vibe. πŸ™ˆ


✨ FUNCTION PARAMETERS ✨

  • devid β€” the device ID to query. that's the one you're asking about, bestie πŸ’…

✨ RETURN VALUE ✨

returns true if devid is a playback device, false if it is recording. literally that simple. πŸ‘‘


✨ THREAD SAFETY ✨

it is safe to call this function from any thread. so go off, call it from wherever, it's giving thread-safe 🧚✨


✨ AVAILABILITY ✨

this function is available since SDL 3.2.0. iconic behavior fr fr πŸ’œ


okay bestie that's the whole page!! brought to you by Simple Directmedia Layer, version SDL 3.4.18, and the manual page SDL_IsAudioDevicePlayback(3) πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from