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

`QMediaDevices::defaultAudioInput()` wrong device

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • None
    • 6.5.0 RC
    • Multimedia
    • None
    • Qt 6.5.0-rc
    • Linux/X11
    • a33d0422f (dev), 5e7121b68 (6.5), b7e5a7463 (6.6), 7b7598357 (dev), 05bd3153e (6.5), c1025d5ff (6.6)

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes