Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Getting access to front microphone on mobile device.
Forum Updated to NodeBB v4.3 + New Features

Getting access to front microphone on mobile device.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 334 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Firson
    wrote on last edited by
    #1

    Hi. I have some trouble.
    I,m trying to get data from two microphones on my Xaomi Redmi 8.
    If i use code like this:
    const QList<QAudioDevice> audioDevices = QMediaDevices::audioInputs();
    I get only one mic and tuner in the list.
    Same operation on Redmi 9 - same result.
    How can i get access to second microphone?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      robert1997b
      wrote on last edited by
      #2

      First, ensure that both your Redmi 8 and Redmi 9 devices actually have two physical microphones. Some phones have multiple microphones for noise cancellation or stereo recording, while others may have only one. Make sure your app has the necessary permissions to access the microphone. In Android, you need to request the RECORD_AUDIO permission in your app’s manifest file.

      QMediaPlayer* player = new QMediaPlayer;
      QAudioOutput* audioOutput = new QAudioOutput;
      player->setAudioOutput(audioOutput);
      player->setSource(QUrl::fromLocalFile("/path/to/coolsong.mp3"));
      audioOutput->setVolume(50);
      player->play();

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved