qt6.qtmultimedia: fix build on darwin
This commit is contained in:
parent
a79236678b
commit
6b7fc06bc5
@ -39,6 +39,8 @@ qtModule {
|
|||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
../patches/fix-qtgui-include-incorrect-case.patch
|
../patches/fix-qtgui-include-incorrect-case.patch
|
||||||
|
# Remove new constants since macOS 12+, since we build Qt with the macOS 11 SDK
|
||||||
|
../patches/qtmultimedia-darwin-revert-replace-deprecated-constant.patch
|
||||||
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
|
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
|
||||||
../patches/qtmultimedia-windows-no-uppercase-libs.patch
|
../patches/qtmultimedia-windows-no-uppercase-libs.patch
|
||||||
../patches/qtmultimedia-windows-resolve-function-name.patch
|
../patches/qtmultimedia-windows-resolve-function-name.patch
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
diff --git a/src/multimedia/darwin/qdarwinmediadevices.mm b/src/multimedia/darwin/qdarwinmediadevices.mm
|
||||||
|
index b0a108935..881066928 100644
|
||||||
|
--- a/src/multimedia/darwin/qdarwinmediadevices.mm
|
||||||
|
+++ b/src/multimedia/darwin/qdarwinmediadevices.mm
|
||||||
|
@@ -42,7 +42,7 @@ static AudioDeviceID defaultAudioDevice(QAudioDevice::Mode mode)
|
||||||
|
const AudioObjectPropertyAddress propertyAddress = {
|
||||||
|
selector,
|
||||||
|
kAudioObjectPropertyScopeGlobal,
|
||||||
|
- kAudioObjectPropertyElementMain,
|
||||||
|
+ kAudioObjectPropertyElementMaster,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (auto audioDevice = getAudioObject<AudioDeviceID>(kAudioObjectSystemObject, propertyAddress,
|
||||||
|
@@ -77,7 +77,7 @@ static QList<QAudioDevice> availableAudioDevices(QAudioDevice::Mode mode)
|
||||||
|
|
||||||
|
const AudioObjectPropertyAddress audioDevicesPropertyAddress = {
|
||||||
|
kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal,
|
||||||
|
- kAudioObjectPropertyElementMain
|
||||||
|
+ kAudioObjectPropertyElementMaster
|
||||||
|
};
|
||||||
|
|
||||||
|
if (auto audioDevices = getAudioData<AudioDeviceID>(
|
||||||
|
@@ -130,11 +130,11 @@ static OSStatus audioDeviceChangeListener(AudioObjectID id, UInt32,
|
||||||
|
|
||||||
|
static constexpr AudioObjectPropertyAddress listenerAddresses[] = {
|
||||||
|
{ kAudioHardwarePropertyDefaultInputDevice, kAudioObjectPropertyScopeGlobal,
|
||||||
|
- kAudioObjectPropertyElementMain },
|
||||||
|
+ kAudioObjectPropertyElementMaster },
|
||||||
|
{ kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal,
|
||||||
|
- kAudioObjectPropertyElementMain },
|
||||||
|
+ kAudioObjectPropertyElementMaster },
|
||||||
|
{ kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal,
|
||||||
|
- kAudioObjectPropertyElementMain }
|
||||||
|
+ kAudioObjectPropertyElementMaster }
|
||||||
|
};
|
||||||
|
|
||||||
|
static void setAudioListeners(QDarwinMediaDevices &instance)
|
||||||
|
diff --git a/src/multimedia/darwin/qmacosaudiodatautils_p.h b/src/multimedia/darwin/qmacosaudiodatautils_p.h
|
||||||
|
index 8cc2f8440..5cd6fced2 100644
|
||||||
|
--- a/src/multimedia/darwin/qmacosaudiodatautils_p.h
|
||||||
|
+++ b/src/multimedia/darwin/qmacosaudiodatautils_p.h
|
||||||
|
@@ -44,7 +44,7 @@ void printUnableToReadWarning(const char *logName, AudioObjectID objectID, const
|
||||||
|
|
||||||
|
inline static AudioObjectPropertyAddress
|
||||||
|
makePropertyAddress(AudioObjectPropertySelector selector, QAudioDevice::Mode mode,
|
||||||
|
- AudioObjectPropertyElement element = kAudioObjectPropertyElementMain)
|
||||||
|
+ AudioObjectPropertyElement element = kAudioObjectPropertyElementMaster)
|
||||||
|
{
|
||||||
|
return { selector,
|
||||||
|
mode == QAudioDevice::Input ? kAudioDevicePropertyScopeInput
|
Loading…
Reference in New Issue
Block a user