Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.4.0
-
None
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 |
441759,4 | Add audio listeners for macOS and cleanup code | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 |
441946,2 | Add audio listeners for macOS and cleanup code | 6.4 | qt/qtmultimedia | Status: MERGED | +2 | 0 |