Need for hidden driver scan feature

Through the method (scanForDevices() at juce_mac_CoreAudio.cpp), audio devices are retrieved and used well.

But could you please improve the way I can find hidden audio devices?
According to the investigation, hidden audio devices can only be discovered by knowing their UID and using kAudioHardwarePropertyDeviceForUID.
So, I’m using the code below at scanForDevices().

  UInt32 uidSize = sizeof(uid);

  pa.mSelector = kAudioHardwarePropertyTranslateUIDToDevice;

  if (AudioObjectGetPropertyDataSize (kAudioObjectSystemObject, &pa, uidSize, &uid, &size) == noErr) {
    HeapBlock<AudioDeviceID> devs;
    devs.calloc (size, 1);

    if (AudioObjectGetPropertyData (kAudioObjectSystemObject, &pa, uidSize, &uid, &size, devs) == noErr) {
      char name[1024];
      size = sizeof (name);
      pa.mSelector = kAudioDevicePropertyDeviceName;

      if (AudioObjectGetPropertyData (devs[0], &pa, 0, nullptr, &size, name) == noErr) {
          auto nameString = String::fromUTF8 (name, (int) strlen (name));
          auto numIns  = getNumChannels (devs[0], true);
          auto numOuts = getNumChannels (devs[0], false);

          if (numIns > 0)
              inputDeviceNames.add (nameString);
              inputIds.add (devs[0]);

          if (numOuts > 0)
              outputDeviceNames.add (nameString);
              outputIds.add (devs[0]);

I don’t know what other platforms are like, but it would be nice to have these features(scan hidden devices).
Do you have any plans to make them?


I also hope this feature is supported on various platforms.

And More generally,
I want to have an API so that the device manager can change the properties of the audio device. (add virtual device, renaming, hide…)

Do you have any plans to make them?

1 Like