0

I am trying to set the external mic for MAC using the AudioUnit. I have googled and found that it is possible to set the default input device on mac using https://developer.apple.com/library/mac/technotes/tn2091/_index.html#//apple_ref/doc/uid/DTS10003118-CH1-CURRENTDEVICE

But the problem is that the example on the link is setting the default mac mic. but i am trying to choose the mic myself and it can be either default of user choice. I am able to get the list of connecting input device from the stackoverflow post AudioObjectGetPropertyData to get a list of input devices

But i am not able to get any api which sets the mic option of my choice in the list. Can somebody help me to find a solution for this or a link to an example.

Community
  • 1
  • 1
Dinesh
  • 929
  • 7
  • 25
  • 1
    If you have the `AudioDeviceID` for the desired input mic just use that in your call to `AudioUnitSetProperty`. If you need the ID from UID use `kAudioHardwarePropertyDeviceForUID` – sbooth Sep 23 '15 at 11:34
  • sbooth, Can you share an example code for the same, a few line of codes will be really helpful for me and peoples like me who as stuck in similar issues, – Dinesh Sep 24 '15 at 05:02
  • Do you want code to set the device or convert the UID to the device ID? – sbooth Sep 25 '15 at 18:33

0 Answers0