Add unique identifier to audio hardware
Author: zhengjianhong-techCreated Sep 7, 2026Updated Sep 17, 2026
I would like to ask, does the SDL open-source code take into account returning the unique identifier of the device, such as an audio device? Currently, the unique identifier is SDL_AudioDeviceID, but it changes when the device is plugged in or unplugged, making it an unreliable key for localization. Using the name as the key also has the issue that there might be multiple devices with the same name. Therefore, it is hoped that the SDL_AudioDeviceID can be used to obtain some system-specific unique identifiers for this device. This way, when conducting localization, there will be more reliable basis.
Source: libsdl-org/SDL