Detailed steps on how to reproduce the bug
- Configure any target that uses the juce_audio_devices module.
- Build against a macOS SDK in the range [13.0, 14.2) — e.g. Xcode 14.2 (macOS 13.1 SDK).
- Compilation fails in juce_CoreAudio_mac.cpp (see stacktrace).
Cause: kAudioAggregateDriftCompensationHighQuality is guarded by JUCE_MAC_API_VERSION_CAN_BE_BUILT (13, 0) (≈ __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000, "SDK ≥ 13.0"), but that constant only exists from the macOS 14.2 SDK — it belongs to the Core Audio process-taps feature. The neighbouring AudioHardwareCreateProcessTap / …DestroyProcessTap in AudioHardwareTapping.h are API_AVAILABLE(macos(14.2)), and the kAudioAggregateDriftCompensation* enum in AudioHardware.h is a bare CF_ENUM with no availability macro — so on an older SDK it's a hard "undeclared identifier" error, not a deprecation.
What is the expected behaviour?
Compiles on SDKs < 14.2 by falling back to the existing #else branch (kAudioSubDeviceDriftCompensationHighQuality). Raising the guard from (13, 0) to (14, 2) achieves this and leaves 14.2+ builds unchanged:
--- a/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp
+++ b/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp
@@ -1216,7 +1216,7 @@
subDevice.setInt (kAudioSubDeviceDriftCompensationKey, uid != clockingDeviceUid);
subDevice.setInt (kAudioSubDeviceDriftCompensationQualityKey,
-
#if JUCE_MAC_API_VERSION_CAN_BE_BUILT (13, 0)
-
#if JUCE_MAC_API_VERSION_CAN_BE_BUILT (14, 2)
kAudioAggregateDriftCompensationHighQuality);
#else
kAudioSubDeviceDriftCompensationHighQuality);
Note: 14.2 is derived from Apple's API_AVAILABLE(macos(14.2)) on the adjacent process-taps API plus the shared SubTap-drift enum block; I couldn't diff a 14.0-vs-14.2 AudioHardware.h directly to confirm absence in 14.0/14.1, so the exact threshold may need a minor nudge if it landed in a different 14.x point release.
Operating systems
macOS
What versions of the operating systems?
Build host macOS 12.7.3; the determining factor is the macOS 13.1 SDK bundled with Xcode 14.2. Any SDK in [13.0, 14.2) is affected.
Architectures
Arm64/aarch64
Stacktrace
Build-time error (no runtime stacktrace):
juce_CoreAudio_mac.cpp:1220:31: error: use of undeclared identifier
'kAudioAggregateDriftCompensationHighQuality'; did you mean
'kAudioSubDeviceDriftCompensationHighQuality'?
kAudioAggregateDriftCompensationHighQuality);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AudioHardware.h:1645:5: note: 'kAudioSubDeviceDriftCompensationHighQuality' declared here
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the develop branch
The bug is present on the develop branch
Code of Conduct
Detailed steps on how to reproduce the bug
Cause: kAudioAggregateDriftCompensationHighQuality is guarded by JUCE_MAC_API_VERSION_CAN_BE_BUILT (13, 0) (≈ __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000, "SDK ≥ 13.0"), but that constant only exists from the macOS 14.2 SDK — it belongs to the Core Audio process-taps feature. The neighbouring AudioHardwareCreateProcessTap / …DestroyProcessTap in AudioHardwareTapping.h are API_AVAILABLE(macos(14.2)), and the kAudioAggregateDriftCompensation* enum in AudioHardware.h is a bare CF_ENUM with no availability macro — so on an older SDK it's a hard "undeclared identifier" error, not a deprecation.
What is the expected behaviour?
Compiles on SDKs < 14.2 by falling back to the existing #else branch (kAudioSubDeviceDriftCompensationHighQuality). Raising the guard from (13, 0) to (14, 2) achieves this and leaves 14.2+ builds unchanged:
--- a/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp
+++ b/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp
@@ -1216,7 +1216,7 @@
subDevice.setInt (kAudioSubDeviceDriftCompensationKey, uid != clockingDeviceUid);
subDevice.setInt (kAudioSubDeviceDriftCompensationQualityKey,
Note: 14.2 is derived from Apple's API_AVAILABLE(macos(14.2)) on the adjacent process-taps API plus the shared SubTap-drift enum block; I couldn't diff a 14.0-vs-14.2 AudioHardware.h directly to confirm absence in 14.0/14.1, so the exact threshold may need a minor nudge if it landed in a different 14.x point release.
Operating systems
macOS
What versions of the operating systems?
Build host macOS 12.7.3; the determining factor is the macOS 13.1 SDK bundled with Xcode 14.2. Any SDK in [13.0, 14.2) is affected.
Architectures
Arm64/aarch64
Stacktrace
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the
developbranchThe bug is present on the
developbranchCode of Conduct