How do I select the top microphone on iOS
-
wrote on 21 Aug 2023, 17:40 last edited by
I'm having some trouble finding documentation on how to select the top front microphone on iOS using QT. How is it done?
The following code:
QList devices = QMediaDevices::audioInputs(); for(const auto& deviceInfo: devices) { qDebug() << "Device name:" << deviceInfo.id(); qDebug() << "Supported sample rates:" << deviceInfo.minimumSampleRate()<< "; " << deviceInfo.maximumSampleRate(); qDebug() << "Supported channel counts:" << deviceInfo.minimumChannelCount() << "; " << deviceInfo.maximumChannelCount(); qDebug() << "Supported codecs:" << deviceInfo.supportedSampleFormats(); qDebug() << "--------------------------------"; }
only outputs one device which clearly isn't true:
Device name: "com.apple.avfoundation.avcapturedevice.built-in_audio:0" Supported sample rates: 1 ; 96000 Supported channel counts: 1 ; 16 Supported codecs: QList(UInt8, Int16, Int32, Float)
I need to know how I select the top microphone instead of the (default) bottom microphone.
-
wrote on 20 Jun 2024, 12:12 last edited by wadu
How can I select the top front microphone on an iOS device using Qt? I’m currently using some code to list the available audio input devices, but it only detects a single default microphone. I need to find a way to specifically choose the top front microphone instead of the default bottom one for my application. Could someone explain how to achieve this or point me to the relevant documentation?