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

Default audio output device not listed as default in MediaDevices.audioOutputs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 6.2.2
    • Fix Version/s: 6.3.0 Alpha, 6.4.0 Beta1
    • Component/s: Multimedia
    • Labels:
      None
    • Environment:
      Macbook Pro (M1, 2020) running macOS 12.1
    • Platform/s:
      macOS
    • Commits:
      dee6b39639 (qt/qtmultimedia/dev) f4cb911140 (qt/qtmultimedia/6.2) 60e5b9329d (qt/qtmultimedia/6.3) f4cb911140 (qt/tqtc-qtmultimedia/6.2)

      Description

      The following code gets the audioOutputs from MediaDevices and lists the description and isDefault. In all cases, isDefault is false.

       

      import QtQuick
      import QtMultimedia
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("QtMultimedia audio outputs")
      
          Component.onCompleted:
          {
              for (const device of devices.audioOutputs)
                  console.log("Device " + device.description + "; default: " + device.isDefault)
          }
      
          MediaDevices {
              id: devices
          }
      }
      

       

      On my Mac, the output is

       

      qml: Device MacBook Pro Speakers; default: false
      qml: Device BlackHole 2ch; default: false
      

       

      even though devices.defaultAudioOutput returns the first item in the list.

       

        Attachments

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

          Activity

            People

            Assignee:
            dorisverria Doris Verria
            Reporter:
            paulmasri Paul
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes