SDL_HINT_AUD...LUDE_MONITORS(3)

πŸ’– SDL_HINT_AUDIO_INCLUDE_MONITORS(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, this one's all about SDL_HINT_AUDIO_INCLUDE_MONITORS and honestly it's giving "secret settings menu" energy ✨


🌸 NAME 🌸

SDL_HINT_AUDIO_INCLUDE_MONITORS β€” a variable that makes SDL not ignore audio "monitors". no cap, that's literally its whole job πŸŽ€


✨ SYNOPSIS ✨

#include <SDL3/SDL_hints.h>

#define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so real talk: rn this hint is only used by the PulseAudio driver. that's it. just PulseAudio being PulseAudio πŸ’…

by default, SDL lowkey ignores any audio device that isn't attached to actual physical hardware. like, if it can't touch it, it doesn't wanna know it πŸ‘‹

but the way that changing this hint to "1" works is chef's kiss β€” it makes SDL expose everything it sees that looks like an audio source or sink. and yeah, that means you're gonna get "devices" showing up in the list that the user probably does not want or need, bestie 😭 but it's highkey useful when you're trying to hook SDL up to some sort of virtual device, etc. so like, situational queen behavior πŸ‘‘

the variable can be set to these values:

  • "0" β€” audio monitor devices will be ignored. (this is the default, so if you do nothing, you get this 🫢)
  • "1" β€” audio monitor devices will show up in the device list. ✨ they're here, they're visible, they're in the lineup πŸ’…
⚠️ super important: this hint should be set before SDL is initialized. set it late and it's giving "too late bestie, doors are closed" πŸšͺπŸ”’

🌈 AVAILABILITY 🌈

this hint has been available since SDL 3.2.0 β€” so if you're on anything older, sorry babe, no monitor-including for you πŸ’€


and that's the whole page fr fr πŸ“ this was brought to you by Simple Directmedia Layer, version SDL 3.4.18 β€” mwah, slay, periodt, go include those monitors responsibly πŸ‘‘πŸ’–πŸ§š

πŸ“¦ where this page comes from