Hi!
Updating a project to JUCE 9.0.0 and building on a (rather old) pipeline, I stumbled on an issue with the “Improved macOS CoreAudio Support” part: I believe the kAudioAggregateDriftCompensationHighQuality is guarded with the wrong SDK version.
Building juce_audio_devices from current develop against a macOS SDK in the range [13.0, 14.2) (e.g. Xcode 14.2 / macOS 13.1 SDK) fails to compile with:
juce_CoreAudio_mac.cpp:1220:31: error: use of undeclared identifier
‘kAudioAggregateDriftCompensationHighQuality’; did you mean
‘kAudioSubDeviceDriftCompensationHighQuality’?
The constant is guarded by JUCE_MAC_API_VERSION_CAN_BE_BUILT (13, 0), i.e. “SDK ≥ 13.0” — but kAudioAggregateDriftCompensation* is part of the Core Audio process-taps feature and only exists from the macOS 14.2 SDK (the adjacent AudioHardwareCreateProcessTap in AudioHardwareTapping.h is API_AVAILABLE(macos(14.2)), and the enum itself carries no availability macro, so on an older SDK it’s a hard error rather than a deprecation). Any SDK between 13.0 and 14.2 takes the wrong branch.
Here is a one-line fix proposal: raise the guard to (14, 2) so pre-14.2 SDKs fall back to the existing #else (kAudioSubDeviceDriftCompensationHighQuality):
- #if JUCE_MAC_API_VERSION_CAN_BE_BUILT (13, 0)
+ #if JUCE_MAC_API_VERSION_CAN_BE_BUILT (14, 2)
kAudioAggregateDriftCompensationHighQuality);
I put the full writeup, stacktrace and the proposed diff in the GitHub issue: [Bug]: CoreAudio fails to build on macOS 13.x SDK — kAudioAggregateDriftCompensationHighQuality guarded with the wrong SDK version · Issue #1687 · juce-framework/JUCE · GitHub
NB: it turned up on a CI/build machine stuck on Xcode 14.2. If anyone can confirm the exact 14.x point release the constant first shipped in, that’d pin the threshold even more precisely.
Best,
Benjamin
