SDL_IsAudioDevicePhysical(3)
β¨ SDL_IsAudioDevicePhysical β¨
okay so bestie, we're in the SDL3 FUNCTIONS corner of the SDL_IsAudioDevicePhysical(3) manual, and this one is genuinely a lil vibe check for your audio devices π
πΈ NAME πΈ
SDL_IsAudioDevicePhysical β figure out if an audio device is physical (aka the real hardware) instead of logical (aka the lil made-up ones). π
π SYNOPSIS π
#include <SDL3/SDL_audio.h>
bool SDL_IsAudioDevicePhysical(SDL_AudioDeviceID devid);
π¦ DESCRIPTION π¦
so an SDL_AudioDeviceID that represents actual physical hardware is a physical device β there's literally one for every single piece of hardware SDL can see. β¨
Logical devices are the ones you make by calling SDL_OpenAudioDevice or SDL_OpenAudioDeviceStream. And the way that each one is associated with a physical device? cute. But here's the tea: there can be any number of logical devices hanging off of one physical device. not one, not two, any number. no cap. π
For the most part, logical and physical IDs are interchangeable β like, if you try to open a logical device, SDL understands to assign that effort to the underlying physical device, etc. etc. π« But sometimes you just wanna know if some arbitrary device ID is physical or logical, y'know? That's exactly what this function reports. slay.
β οΈ ok important: this function may return eithertrueorfalsefor invalid device IDs. so don't come for it expecting a clean answer on garbage input, bestie. π
π FUNCTION PARAMETERS π
devidβ the device ID you wanna query. that's it, that's the whole parameter. π«Ά
π RETURN VALUE π
Returns true if devid is a physical device, and false if it's logical. simple as. β¨
π₯ THREAD SAFETY π₯
It is safe to call this function from any thread. go off, queen. π
π AVAILABILITY π
This function is available since SDL 3.2.0. β
and that's the whole page, no notes π
brought to you by Simple Directmedia Layer, straight from SDL 3.4.18 β SDL_IsAudioDevicePhysical(3), signing off, mwah ππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms