Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-112219

`QMediaDevices::defaultAudioInput()` wrong device

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.0 RC
    • Multimedia
    • None
    • Qt 6.5.0-rc
    • Linux/X11

    Description

      Hello,

      I am trying to get PCM 16 bit audio using QAudioSource.
      When I call `QMediaDevices::defaultAudioInput()` it gives me the wrong microphone.

      I have written a test code that lists all the microphones:

          auto inputDevices = QMediaDevices::audioInputs();
          auto input = QMediaDevices::defaultAudioInput();
      
          qDebug() << "Default:" << input.description() << "\nAll available:";
          for (const auto &inputdevice : inputDevices) {
               qDebug().noquote() << "Description:" << inputdevice.description()
                                                << "is default:" << inputdevice.isDefault()
                                                << "id:" << inputdevice.id();
          }
      
      Default: "Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo" 
      All available:
      Description: Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo is default: false id: alsa_input.pci-0000_05_00.6.analog-stereo
      Description: Razer Seiren Mini Mono is default: false id: alsa_input.usb-Razer_Inc_Razer_Seiren_Mini_UC2119L03203407-00.mono-fallback
      

      and that is wrong! In Qt 5 it still output the correct one (Razer Seiren Mini Mono) and if I remember correctly in Qt 6.4.2 too. In Qt 6.5.0-rc it now outputs the wrong one.

      Attachments

        Activity

          People

            artemiy Artem Dyomin
            sme Tim Gromeyer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: