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

QMediaDevices on MacOS needs additional listeners to correctly catch device changes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.4.2, 6.5.0 Beta1
    • 6.4.0
    • Multimedia
    • None
    • macOS

    Description

      QDarwinMediaDevices::QDarwinMediaDevices() in qdarwinmediadevices.mm only registers 
      kAudioHardwarePropertyDevices listener with core audio to detect device changes.

      Unfortunately this is not enough to catch all relevant changes. For instance if a user simply changes default audio output device in system settings (without insertion or removal of any hardware), this event is not triggered... and in that case the app is never notified of any change and can't correctly switch to the new default output.

      This also creates a side issue when a newly inserted hardware device automatically becomes the new default output (good example is airpod connection). Because the hardware event takes place before the default output switch, at the single time the app is notified it reports the wrong "old" output device. In that case I think a correct behavior should be to have the app notified twice (1st time for device insertion and 2nd for default output change).

      Additional listeners on at least kAudioHardwarePropertyDefaultOutputDevice and kAudioHardwarePropertyDefaultInputDevice should be added to fix the issue.

      Attachments

        For Gerrit Dashboard: QTBUG-108020
        # Subject Branch Project Status CR V

        Activity

          People

            artemiy Artem Dyomin
            mspeder Matthieu Speder
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes