Skip to content

CoreMIDI iOS xcode26.0 b1

Alex Soto edited this page Jun 9, 2025 · 2 revisions

#CoreMIDI.framework

diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h	2025-04-19 03:27:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h	2025-05-19 00:52:17
@@ -186,8 +186,9 @@
 			Send a MIDIPacketList to the destination endpoint whose refCons are being passed as
 			arguments.
 	*/
-	OSStatus	(*Send)(MIDIDriverRef __nonnull self, const MIDIPacketList *pktlist, void *destRefCon1, void *destRefCon2);
-	
+	OSStatus	(*Send)(MIDIDriverRef __nonnull self, const MIDIPacketList* pktlist,
+					void* destRefCon1, void* destRefCon2) MIDI_REALTIME_API;
+
 	/*!
 		@fn EnableSource
 		@discussion
@@ -222,8 +223,9 @@
 			cannot rely on the MIDI events arriving in order, due to MIDIServer's schedule-ahead
 			facilities.
 	*/
-	OSStatus	(*Monitor)(MIDIDriverRef __nonnull self, MIDIEndpointRef dest, const MIDIPacketList *pktlist);
-    
+	OSStatus	(*Monitor)(MIDIDriverRef __nonnull self, MIDIEndpointRef dest,
+					const MIDIPacketList* pktlist) MIDI_REALTIME_API;
+
 	/*!
 		@fn SendPackets
 		@discussion
@@ -232,17 +234,18 @@
 			Send a MIDIEventList to the destination endpoint whose refCons are being passed as
 			arguments.
 	*/
-	OSStatus	(*SendPackets)(MIDIDriverRef __nonnull self, const MIDIEventList *pktlist, void *destRefCon1, void *destRefCon2);
-    
-    /*!
+	OSStatus	(*SendPackets)(MIDIDriverRef __nonnull self, const MIDIEventList* pktlist,
+					void* destRefCon1, void* destRefCon2) MIDI_REALTIME_API;
+
+	/*!
 		@fn MonitorEvents
 		@discussion
 			Only for version 3 drivers (new for macOS 12.0).
 
 			Same as Monitor but uses MIDEventList, whose protocol may vary from MIDI 1.0.
 	*/
-	OSStatus	(*MonitorEvents)(MIDIDriverRef __nonnull self, MIDIEndpointRef dest, const MIDIEventList *pktlist);
-
+	OSStatus	(*MonitorEvents)(MIDIDriverRef __nonnull self, MIDIEndpointRef dest,
+					const MIDIEventList* pktlist) MIDI_REALTIME_API;
 };
 
 
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h	2025-04-19 04:17:25
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h	2025-05-19 00:45:06
@@ -89,6 +89,22 @@
 #endif
 
 //=============================================================================
+
+/*!
+	@macro	MIDI_REALTIME_API
+	@brief	A function (type) which is guaranteed / required to be realtime safe.
+*/
+#if defined(__has_attribute) && __has_attribute(nonblocking)
+#  ifdef __cplusplus
+#    define MIDI_REALTIME_API [[clang::nonblocking]]
+#  else
+#    define MIDI_REALTIME_API __attribute__((nonblocking))
+#  endif
+#else
+#    define MIDI_REALTIME_API
+#endif
+
+//=============================================================================
 #pragma mark	Error Constants
 /*!
     @enum           Error Constants
@@ -348,7 +364,8 @@
 						identifies the source of the data.
 */
 typedef void
-(^MIDIReceiveBlock)(const MIDIEventList *evtlist, void * __nullable srcConnRefCon);
+(^MIDIReceiveBlock)(const MIDIEventList *evtlist, void * __nullable srcConnRefCon)
+	MIDI_REALTIME_API;
 
 /*!
 	@typedef		MIDIReadProc
@@ -371,7 +388,10 @@
 						identifies the source of the data.
 */
 typedef void
-(*MIDIReadProc)(const MIDIPacketList *pktlist, void * __nullable readProcRefCon, void * __nullable srcConnRefCon) API_DEPRECATED("use MIDIReceiveBlock and MIDIEventLists", macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
+(*MIDIReadProc)(const MIDIPacketList *pktlist, void * __nullable readProcRefCon,
+	void * __nullable srcConnRefCon)
+		MIDI_REALTIME_API
+		API_DEPRECATED("use MIDIReceiveBlock and MIDIEventLists", macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@typedef		MIDIReadBlock
@@ -391,7 +411,9 @@
 						identifies the source of the data.
 */
 typedef void
-(^MIDIReadBlock)(const MIDIPacketList *pktlist, void * __nullable srcConnRefCon) API_DEPRECATED("use MIDIReceiveBlock and MIDIEventLists", macos(10.11, API_TO_BE_DEPRECATED), ios(9.0, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
+(^MIDIReadBlock)(const MIDIPacketList *pktlist, void * __nullable srcConnRefCon)
+	MIDI_REALTIME_API
+	API_DEPRECATED("use MIDIReceiveBlock and MIDIEventLists", macos(10.11, API_TO_BE_DEPRECATED), ios(9.0, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@typedef		MIDICompletionProc
@@ -2373,7 +2395,9 @@
 extern OSStatus
 MIDISendEventList(	MIDIPortRef 				port,
 					MIDIEndpointRef 			dest,
-					const MIDIEventList *		evtlist )	API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(tvos, watchos);
+					const MIDIEventList *		evtlist )
+						MIDI_REALTIME_API
+						API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDISend
@@ -2396,9 +2420,10 @@
 MIDISend(	MIDIPortRef 			port,
 			MIDIEndpointRef 		dest,
 			const MIDIPacketList *	pktlist )
-	API_DEPRECATED_WITH_REPLACEMENT("MIDISendEventList",
-									macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
-    
+				MIDI_REALTIME_API
+				API_DEPRECATED_WITH_REPLACEMENT("MIDISendEventList",
+					macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
+
 /*!
 	@function		MIDISendSysex
 
@@ -2489,7 +2514,9 @@
 */
 extern OSStatus
 MIDIReceivedEventList(	MIDIEndpointRef			src,
-						const MIDIEventList *	evtlist )	API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(tvos, watchos);
+						const MIDIEventList *	evtlist )
+							MIDI_REALTIME_API
+							API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIReceived
@@ -2515,8 +2542,9 @@
 extern OSStatus
 MIDIReceived(	MIDIEndpointRef			src,
 				const MIDIPacketList * 	pktlist )
-		API_DEPRECATED_WITH_REPLACEMENT("MIDIReceivedEventList",
-										macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
+					MIDI_REALTIME_API
+					API_DEPRECATED_WITH_REPLACEMENT("MIDIReceivedEventList",
+						macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@function		MIDIFlushOutput
@@ -2584,7 +2612,9 @@
 */
 extern MIDIEventPacket *
 MIDIEventListInit(	MIDIEventList *evtlist,
-					MIDIProtocolID protocol)			API_AVAILABLE(macos(11.0), ios(14.0), tvos(15.0), watchos(8.0));
+					MIDIProtocolID protocol)
+						MIDI_REALTIME_API
+						API_AVAILABLE(macos(11.0), ios(14.0), tvos(15.0), watchos(8.0));
 
 /*!
 	@function		MIDIEventListAdd
@@ -2622,7 +2652,9 @@
 					MIDIEventPacket *	curPacket,
 					MIDITimeStamp		time,
 					ByteCount			wordCount,
-					const UInt32 *		words)			API_AVAILABLE(macos(11.0), ios(14.0), tvos(15.0), watchos(8.0));
+					const UInt32 *		words)
+						MIDI_REALTIME_API
+						API_AVAILABLE(macos(11.0), ios(14.0), tvos(15.0), watchos(8.0));
 
 //==================================================================================================
 #pragma mark Packet Lists (Deprecated in favor of Event Lists)
@@ -2669,6 +2701,7 @@
 */
 extern MIDIPacket *
 MIDIPacketListInit(	MIDIPacketList *pktlist )
+			MIDI_REALTIME_API
 			API_DEPRECATED_WITH_REPLACEMENT("MIDIEventListInit",
 											macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
@@ -2707,6 +2740,7 @@
 					MIDITimeStamp		time,
 					ByteCount			nData,
 					const Byte *		data)
+			MIDI_REALTIME_API
 			API_DEPRECATED_WITH_REPLACEMENT("MIDIEventListAdd",
 											macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 

Clone this wiki locally