macOS doesn't show mic alert window with AudioToolbox

Hi,

I use AudioQueueNewInput() with my very own run loop and dedicated thread. But now it doesn't show the mic alert window.

Howto fix this?

AudioQueueNewInput(&(core_audio_port->record_format),
  ags_core_audio_port_handle_input_buffer,
  core_audio_port,
  ags_core_audio_port_input_run_loop, kCFRunLoopDefaultMode,
  0,
  &(core_audio_port->record_aq_ref));
Answered by joel2001k in 814610022

after signing the binary it worked.

I tried this to obtain microphone access:

  [AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:^(BOOL granted) {
      if (granted) {
        g_message("granted microphone access");
      }else{
        g_message("not granted microphone access");	
      }
    }];

Further I added these keys and values to Info.plist:

    <key>NSCameraUsageDescription</key>
    <string>Only microphone used.</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>The application uses your microphone.</string>

And the sandbox and hardening entitlements:

  <key>com.apple.security.device.audio-input</key>
  <true/>
  <key>com.apple.security.device.microphone</key>
  <true/>

But it didn't work.

Accepted Answer

after signing the binary it worked.

macOS doesn't show mic alert window with AudioToolbox
 
 
Q