[Interest] Trying to access Microphone via QAudioInput on Mac 10.14
roland.m.winklmeier at gmail.com
Fri May 3 16:44:19 CEST 2019
Am Fr., 3. Mai 2019 um 16:35 Uhr schrieb Jason H <jhihn at gmx.com>:
> You have to add the description of microphone use to be presented to the
> I've done somethign similar to this, for video I think, and I did get the
> popup and it worked as it should have.
Almost. Meanwhile I can answer my own question.
The description you are referring to was already added in the form of
<key>NSMicrophoneUsageDescription</key>. However that did not cause any
popup. The reason is that when creating QAudioInput, its using the
CoreAudio plugin. In that case, the security chip in MacOS prevents the
access without saying anything. For the popup to be raised, AVFoundation is
required. That is used in video by default, thats why it worked for you.
The workaround for audio is to ask via
for the current authorization and if not yet determined, request the access
before the audio input device is opened. That will raise the popup and kill
the app if NSMicrophoneUsageDescription is missing.
Maybe its worth adding that QtMultimedia plugins.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest