summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-07-18 15:56:03 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-07-18 15:56:28 -0400
commitbb29478aa2739f985cc7d41ae48340a85f0b89cb (patch)
tree91e4686747d0de94e8f1a8fc9abbfd9cd95d8907
parent727613b4b744658b6a32916a82af2717cd54c11d (diff)
stop using Gestalt() on OS X (deprecated and no longer operating correctly)
The incorrect behaviour was documented and did not cause issues in Ardour, but we should still stop using this ancient call.
-rw-r--r--libs/ardour/globals.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index cdfd4e036d..974247aef5 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -116,7 +116,7 @@
#include "audiographer/routines.h"
#if defined (__APPLE__)
- #include <Carbon/Carbon.h> // For Gestalt
+#include <CoreFoundation/CoreFoundation.h>
#endif
#include "pbd/i18n.h"
@@ -206,12 +206,8 @@ setup_hardware_optimization (bool try_optimization)
}
#elif defined (__APPLE__) && defined (BUILD_VECLIB_OPTIMIZATIONS)
- SInt32 sysVersion = 0;
- if (noErr != Gestalt(gestaltSystemVersion, &sysVersion))
- sysVersion = 0;
-
- if (sysVersion >= 0x00001040) { // Tiger at least
+ if (floor (kCFCoreFoundationVersionNumber) > kCFCoreFoundationVersionNumber10_4) { /* at least Tiger */
compute_peak = veclib_compute_peak;
find_peaks = veclib_find_peaks;
apply_gain_to_buffer = veclib_apply_gain_to_buffer;