[Scummvm-git-logs] scummvm master -> e79acb29c2220af47fb43c55eae7408b7a8d74f1

dwatteau noreply at scummvm.org
Sat Oct 4 18:11:48 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
e79acb29c2 MACOS: Some CoreAudio fixes/improvements for older macOS


Commit: e79acb29c2220af47fb43c55eae7408b7a8d74f1
    https://github.com/scummvm/scummvm/commit/e79acb29c2220af47fb43c55eae7408b7a8d74f1
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-04T19:54:54+02:00

Commit Message:
MACOS: Some CoreAudio fixes/improvements for older macOS

* Use VERSION_MIN_REQUIRED instead of VERSION_MAX_ALLOWED; this is
  what SDL-1.2, Fluidsynth and TenFourFox do, and it does fix using
  the older APIs when targeting 10.4 with the 10.5 SDK.
* No need to silence the SDK warnings about the use of deprecated
  APIs, as we now properly rely on checking the targeted macOS
  release (i.e. the system headers already don't print any warning
  when using -mmacosx-version-min=10.4).
* Use proper cast for FSPathMakeRef when using the older APIs.

Changed paths:
    backends/midi/coreaudio.cpp


diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp
index 2391ccb8244..0ca0cd8c16d 100644
--- a/backends/midi/coreaudio.cpp
+++ b/backends/midi/coreaudio.cpp
@@ -30,13 +30,10 @@
 
 // With the release of Mac OS X 10.5 in October 2007, Apple deprecated the
 // AUGraphNewNode & AUGraphGetNodeInfo APIs in favor of the new AUGraphAddNode &
-// AUGraphNodeInfo APIs. While it is easy to switch to those, it breaks
-// compatibility with 10.4, for which we need to use the older APIs.
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
+// AUGraphNodeInfo APIs. The newer APIs are used by default, but we do need to
+// use the old ones when building for 10.4.
+#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
 	#define USE_DEPRECATED_COREAUDIO_API 1
-	// Try to silence warnings about use of deprecated APIs
-	#undef DEPRECATED_ATTRIBUTE
-	#define DEPRECATED_ATTRIBUTE
 #else
 	#define USE_DEPRECATED_COREAUDIO_API 0
 #endif
@@ -110,7 +107,7 @@ int MidiDriver_CORE::open() {
 	RequireNoErr(NewAUGraph(&_auGraph));
 
 	AUNode outputNode, synthNode;
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
 	ComponentDescription desc;
 #else
 	AudioComponentDescription desc;
@@ -188,7 +185,7 @@ void MidiDriver_CORE::loadSoundFont(const char *soundfont) {
 
 #if USE_DEPRECATED_COREAUDIO_API
 	FSRef fsref;
-	err = FSPathMakeRef((const byte *)soundfont, &fsref, NULL);
+	err = FSPathMakeRef((const UInt8 *)soundfont, &fsref, NULL);
 
 	if (err == noErr) {
 		err = AudioUnitSetProperty(




More information about the Scummvm-git-logs mailing list