AudioKit doesn't show all the input & output devices available on my Mac

59 Views Asked by At

Lately I've been engaged in building audio apps using Swift's AudioKit library. I'm trying to build a simple test app where I can choose the input and output device independently and connect the two, so I can listen to my microphone in real time. My target destinations are Mac Catalyst, iPad and iOS.

In order to list the devices, I'm calling the AudioKit static class directly:

var availableInputDevices: [Device] { AudioEngine.inputDevices } 
var availableOutputDevices: [Device] { AudioEngine.outputDevices } 

The issue is that these methods only return the selected audio device on my Mac, instead of returning all of the available devices. I've also noticed that by setting only the Mac as the target destination, AudioKit uses different methods entirely.

I've also tried to use the Settings.session.availableInputs and Settings.session.availableOutputs properties, which I found by reading the InputDeviceDemo on the AudioKit's Cookbook, however they return the same devices.

It's also important to notice that a lot of the questions on StackOverflow use old AudioKit versions, therefore the solutions are not accurate. That's why I decided to open this question.

Can someone with more experience give me more info on how this works and if what I want to do is even possible using AudioKit?

Thanks a lot in advance =)

0

There are 0 best solutions below