diff options
author | Artem Dyomin <artem.dyomin@qt.io> | 2022-11-04 15:04:03 +0100 |
---|---|---|
committer | Artem Dyomin <artem.dyomin@qt.io> | 2022-11-07 13:40:42 +0100 |
commit | 2466273b5b60227427ccca20680542dea9fe581d (patch) | |
tree | c9a735a79a41849a5ac8d7635e6a05e402719e8e /src/multimedia/audio | |
parent | fe2e90b6e3b61671b94c9e517ce736fba995f3ef (diff) |
Add audio listeners for macOS and cleanup code
QMediaDevices doc says:
The default device can change during the runtime of the application.
The audioInputsChanged/audioOutputsChanged signal
is emitted in this case.
What's done:
- add listening of properties kAudioHardwarePropertyDefaultOutputDevice
and kAudioHardwarePropertyDefaultInputDevice in order to handle
default input/output changes.
- cleanup a mess of defines in qdarwinmediadevices.mm
- some refactoring with code improving.
Task-number: QTBUG-108020
Pick-to: 6.4
Change-Id: I35aec4f9da9755036141a70f5ce48f6db73d8148
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Diffstat (limited to 'src/multimedia/audio')
-rw-r--r-- | src/multimedia/audio/qaudiodevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multimedia/audio/qaudiodevice.cpp b/src/multimedia/audio/qaudiodevice.cpp index 54a21f20e..2d7899dbe 100644 --- a/src/multimedia/audio/qaudiodevice.cpp +++ b/src/multimedia/audio/qaudiodevice.cpp @@ -131,7 +131,7 @@ bool QAudioDevice::operator==(const QAudioDevice &other) const return true; if (!d || !other.d) return false; - if (d->mode == other.d->mode && d->id == other.d->id) + if (d->mode == other.d->mode && d->id == other.d->id && d->isDefault == other.d->isDefault) return true; return false; } |