Added SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE

This commit is contained in:
Sam Lantinga
2024-08-03 08:04:46 -07:00
parent 71574ac985
commit f05cd85048
2 changed files with 12 additions and 1 deletions

View File

@@ -228,7 +228,7 @@ static const char *get_audio_device(void *handle, const int channels)
ALSA_Device *dev = (ALSA_Device *)handle;
if (SDL_strcmp(dev->name, "default") == 0) {
const char *device = SDL_getenv("AUDIODEV"); // Is there a standard variable name?
const char *device = SDL_GetHint(SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE);
if (device) {
return device;
} else if (channels == 6) {