No Audio Input to JUCE apps on OSX?

Hi, I noticed on rebuilding my app (based on AudioAppComponent) that there is now no audio input when running on OSX 12.2 (Monterey). To do a sanity check, I also built the AudioSettingsDemo, and verified that it is also receiving no microphone input, despite the OSX Settings panel for Audio registering input levels.

This doesn’t seem to be a Security & Privacy settings issue with Mic access, as my app is listed and checked under apps which are allowed to access the microphone.

Any suggestions on how to move past this sudden blocker?

Thanks! - Wayne

Have you tested running the app from outside your IDE, not under a debugger?

Reuk, thanks for the reply. A good suggestion, but launching both apps from shell outside the debugger gives the same result (no input audio). Also same results doing this with release builds, rather than debug builds.

I am building the xcode project files using Projucer on JUCE v6.1.5.

Also, I should note: when I say “no input audio”, I am receiving getNextAudioBlock callbacks, but the buffer content is zeros.

That’s very strange. Maybe the following questions can narrow down the problem:

  • Are you definitely using the latest JUCE from the develop branch? If not, please try updating and check whether the issue is still present.
  • Failing that, if you stick a breakpoint in the constructor of CoreAudioIODevice at juce_mac_CoreAudio.cpp:986, do you definitely see that the input device is being created?
  • Does the open call (line 1049 of the same file) receive a sensible value for inputChannels?
  • Do you still get audio callbacks if you disable the output device and only use an input device?

You might also want to reset your Mic access permissions.

tccutil reset Microphone

or go nuclear:

tccutil reset Microphone 

I encountered this issue a while back, due to my own incompetence. It turned out that a previous version of my app was granted mic access, but the current version wasn’t. Once I removed the Mic access I was better able to debug the issue.

1 Like

Reuk, I double-checked everything you asked about and it checked out (definitely using v6.1.5 and seeing an audio device be created in the CoreAudioIoDevice constructor).

What finally fixed this (and I should have thought to try it before logging this forum query) was to completely blow away all of the generated Build folder and then regenerated the Xcode project from scratch in Projucer. I don’t know why this fixed the audio problem, but I suspect that the upgrade to OSX Monterey may have borked the app permissions settings in some way that tccutil couldn’t account for (see below).

Thanks for your help – I seem to be out of the woods.

Rory, thanks for the suggestion. The “tccutil reset” didn’t do the trick, but the brute force approach of wiping out all Projucer-generated files seemed to do it (see above).

1 Like