What is the right way to ignore loopback record drivers?

SETUP:
Alienware m17 laptop
Windows 10
Unity 2019.4.36f1
FMOD (UnityAudio disabled)

PROBLEM: Each audio output is also listed as an input, once with “[loopback]” appended to the name. The device is described as connected, and has a separate GUID.

OBSERVATION: When I look at the audio inputs in device manager, or in the microphone selection, no loopback devices are listed. Likewise, when using Unity’s built-in microphone manager no loopback devices are listed.

EXAMPLE:

  • ‘Microphone (Realtek(R) Audio)’ (guid = 4e920e0c-cca6-4738-a276-692cfdaf89fc) [index = 4, CONNECTED]: rate = 48000, mode = STEREO, channels = 2
  • ‘Speakers/Headphones (Realtek(R) Audio) [loopback]’ (41bb3665-0be5-4cb8-99d2-85839bc522ec) [2, CONNECTED]: rate = 48000, mode = _7POINT1, channels = 8

WORKAROUND: Skip everything with “[loopback]” at the end of the name. Or, remove every output whose name includes an input name.
PROBLEM: Both of these workarounds make assumptions about how the loopback name will be formatted.

QUESTION: Is there a more reliable way to identify loopback devices?

“[loopback]” is a suffix we add to loopback device names, so that workaround will be good for the time being. There currently isn’t a direct way to determine whether a device is a loopback device, perhaps we could return this information with System::getDriverInfo or something like that?