Skip to content

AudioToolbox macOS xcode15.0 b1

Alex Soto edited this page Jun 5, 2023 · 1 revision

#AudioToolbox.framework

diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AUAudioUnit.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AUAudioUnit.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AUAudioUnit.h	2023-03-09 19:12:27
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AUAudioUnit.h	2023-05-19 22:13:20
@@ -696,7 +696,7 @@
  
 		Host should setup in the following order:
 		 - Set hostMIDIProtocol
-		 - Set MIDIOutputEventBlock
+		 - Set MIDIOutputEventListBlock
 		 - Call allocateRenderResourcesAndReturnError
  
 		This is bridged to the v2 API property kAudioUnitProperty_MIDIOutputEventListCallback.
@@ -706,6 +706,9 @@
 /*! @property	AudioUnitMIDIProtocol
 	@brief		The MIDI protocol used by the Audio Unit for receiving MIDIEventList data.
 	@discussion
+		Subclassers should override to return the desired protocol in which the Audio Unit wants
+		to receive input MIDI data, otherwise the Audio Unit will default to receiving legacy MIDI.
+		
 		All translatable messages will be converted (if necessary) to this protocol prior to delivery
 		to the Audio Unit.
  
@@ -720,7 +723,20 @@
 		from the Audio Unit. This should be set prior to initialization, all translatable messages
 		will be converted  (if necessary) to this property's protocol prior to delivery to the host.
  
+		Host should setup in the following order:
+		- Set hostMIDIProtocol
+		- Set MIDIOutputEventListBlock
+		- Call allocateRenderResourcesAndReturnError
+
 		This is bridged to the v2 API property kAudioUnitProperty_HostMIDIProtocol.
+ 
+		Notes:
+		- If overriding this property, subclassers must call [super setHostMIDIProtocol:]
+		- hostMIDIProtocol should be set before attempting to query AudioUnitMIDIProtocol
+		or calling allocateRenderResourcesAndReturnError to allow Audio Units to
+		optionally match their input MIDI protocol to the desired host protocol and prevent
+		protocol conversion.
+
 */
 @property (NS_NONATOMIC_IOSONLY) MIDIProtocolID hostMIDIProtocol API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
 
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AUComponent.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AUComponent.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AUComponent.h	2023-03-09 23:49:02
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AUComponent.h	2023-05-24 02:45:09
@@ -66,8 +66,10 @@
 
 CF_ASSUME_NONNULL_BEGIN
 
-#define AU_SUPPORT_INTERAPP_AUDIO 1
 
+  #define AU_SUPPORT_INTERAPP_AUDIO 1
+
+
 #define INTERAPP_AUDIO_DEPRECATED API_DEPRECATED("Inter-App Audio API is deprecated in favor of Audio Units", ios(7.0, 13.0), watchos(2.0, 6.0), tvos(9.0, 13.0), macCatalyst(14.0, 14.0))
 
 
@@ -789,35 +791,41 @@
  					invalid characters.
  	@constant		kAudioUnitErr_MissingKey
  					A required key is missing from a dictionary object.
+	@constant		kAudioUnitErr_ComponentManagerNotSupported
+					The operation can not be performed for a component instance instantiated using the
+					deprecated Component Manager. A host application should use the API functions
+					AudioComponentInstantiate or AudioComponentInstanceNew when rebuilding
+					against the macOS 11 or later SDK.
 */
 CF_ENUM(OSStatus) {
-	kAudioUnitErr_InvalidProperty			= -10879,
-	kAudioUnitErr_InvalidParameter			= -10878,
-	kAudioUnitErr_InvalidElement			= -10877,
-	kAudioUnitErr_NoConnection				= -10876,
-	kAudioUnitErr_FailedInitialization		= -10875,
-	kAudioUnitErr_TooManyFramesToProcess	= -10874,
-	kAudioUnitErr_InvalidFile				= -10871,
-	kAudioUnitErr_UnknownFileType			= -10870,
-	kAudioUnitErr_FileNotSpecified			= -10869,
-	kAudioUnitErr_FormatNotSupported		= -10868,
-	kAudioUnitErr_Uninitialized				= -10867,
-	kAudioUnitErr_InvalidScope				= -10866,
-	kAudioUnitErr_PropertyNotWritable		= -10865,
-	kAudioUnitErr_CannotDoInCurrentContext	= -10863,
-	kAudioUnitErr_InvalidPropertyValue		= -10851,
-	kAudioUnitErr_PropertyNotInUse			= -10850,
-	kAudioUnitErr_Initialized				= -10849,
-	kAudioUnitErr_InvalidOfflineRender		= -10848,
-	kAudioUnitErr_Unauthorized				= -10847,
-	kAudioUnitErr_MIDIOutputBufferFull		= -66753,
-	kAudioComponentErr_InstanceTimedOut		= -66754,
-	kAudioComponentErr_InstanceInvalidated	= -66749,
-	kAudioUnitErr_RenderTimeout				= -66745,
-	kAudioUnitErr_ExtensionNotFound			= -66744,
-	kAudioUnitErr_InvalidParameterValue		= -66743,
-	kAudioUnitErr_InvalidFilePath			= -66742,
-	kAudioUnitErr_MissingKey				= -66741
+	kAudioUnitErr_InvalidProperty					= -10879,
+	kAudioUnitErr_InvalidParameter					= -10878,
+	kAudioUnitErr_InvalidElement					= -10877,
+	kAudioUnitErr_NoConnection						= -10876,
+	kAudioUnitErr_FailedInitialization				= -10875,
+	kAudioUnitErr_TooManyFramesToProcess			= -10874,
+	kAudioUnitErr_InvalidFile						= -10871,
+	kAudioUnitErr_UnknownFileType					= -10870,
+	kAudioUnitErr_FileNotSpecified					= -10869,
+	kAudioUnitErr_FormatNotSupported				= -10868,
+	kAudioUnitErr_Uninitialized						= -10867,
+	kAudioUnitErr_InvalidScope						= -10866,
+	kAudioUnitErr_PropertyNotWritable				= -10865,
+	kAudioUnitErr_CannotDoInCurrentContext			= -10863,
+	kAudioUnitErr_InvalidPropertyValue				= -10851,
+	kAudioUnitErr_PropertyNotInUse					= -10850,
+	kAudioUnitErr_Initialized						= -10849,
+	kAudioUnitErr_InvalidOfflineRender				= -10848,
+	kAudioUnitErr_Unauthorized						= -10847,
+	kAudioUnitErr_MIDIOutputBufferFull				= -66753,
+	kAudioComponentErr_InstanceTimedOut				= -66754,
+	kAudioComponentErr_InstanceInvalidated			= -66749,
+	kAudioUnitErr_RenderTimeout						= -66745,
+	kAudioUnitErr_ExtensionNotFound					= -66744,
+	kAudioUnitErr_InvalidParameterValue				= -66743,
+	kAudioUnitErr_InvalidFilePath					= -66742,
+	kAudioUnitErr_MissingKey						= -66741,
+	kAudioUnitErr_ComponentManagerNotSupported		= -66740
 };
 
 
@@ -1654,7 +1662,7 @@
                                                 API_UNAVAILABLE(macos) INTERAPP_AUDIO_DEPRECATED;
 #endif // AU_SUPPORT_INTERAPP_AUDIO
 
-#if defined(__OBJC__)
+#if defined(__OBJC__) && !(0 && 0)
 #if TARGET_OS_IPHONE
 /*!
 	@function       AudioComponentCopyIcon
@@ -1697,7 +1705,7 @@
 #endif
 #endif
 
-#if defined(__LP64__) || TARGET_OS_IPHONE
+#if (defined(__LP64__) || TARGET_OS_IPHONE) && !(0 && 0)
 /*!
 	@function		AudioUnitExtensionSetComponentList
 	@abstract		Allows the implementor of an audio unit extension to dynamically modify the
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioComponent.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioComponent.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioComponent.h	2023-03-09 19:12:27
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioComponent.h	2023-05-24 02:35:29
@@ -306,7 +306,7 @@
                     ComponentInstanceRecord *, you should not assume that this will always be
                     compatible and usable with Component Manager calls.
 */
-#if TARGET_OS_IPHONE || (defined(AUDIOCOMPONENT_NOCARBONINSTANCES) && AUDIOCOMPONENT_NOCARBONINSTANCES)
+#if TARGET_OS_IPHONE || 0 || (defined(AUDIOCOMPONENT_NOCARBONINSTANCES) && AUDIOCOMPONENT_NOCARBONINSTANCES)
     typedef struct OpaqueAudioComponentInstance *   AudioComponentInstance;
 #else
     typedef struct ComponentInstanceRecord *        AudioComponentInstance;
@@ -453,7 +453,7 @@
                             UInt32 *                            outVersion)
                                                                             API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
 
-#if defined(__OBJC__) && !TARGET_OS_IPHONE
+#if defined(__OBJC__) && !TARGET_OS_IPHONE && !(0 && 0)
 @class NSImage;
 
 /*!
@@ -654,6 +654,7 @@
 						On exit, this is an AudioComponentValidationResult.
 	@result			an OSStatus result code.
 */
+#if !(0 && 0)
 extern OSStatus
 AudioComponentValidate( AudioComponent					inComponent,
 						CFDictionaryRef __nullable		inValidationParameters,
@@ -701,7 +702,7 @@
 								  CFDictionaryRef __nullable	inValidationParameters,
 								  void 							(^inCompletionHandler)(AudioComponentValidationResult, CFDictionaryRef))
 													API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos);
-
+#endif
 /*!
 	@define		kAudioComponentValidationParameter_TimeOut
 	@discussion This is a number that indicates the time in seconds to wait for a validation
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFile.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFile.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFile.h	2023-03-09 19:12:27
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFile.h	2023-05-24 02:47:48
@@ -952,6 +952,21 @@
 							UInt32				*outUserDataSize)			API_AVAILABLE(macos(10.4), ios(2.0), watchos(2.0), tvos(9.0));
 
 /*!
+	@function	AudioFileGetUserDataSize64
+	@abstract   Get the 64-bit size of user data in a file
+	@param      inAudioFile			an AudioFileID.
+	@param      inUserDataID		the four char code of the chunk.
+	@param      inIndex				an index specifying which chunk if there are more than one.
+	@param      outUserDataSize		on output, if successful, the size of the user data chunk.
+	@result							returns noErr if successful.
+*/
+extern OSStatus
+AudioFileGetUserDataSize64 (	AudioFileID			inAudioFile,
+								UInt32				inUserDataID,
+								UInt32				inIndex,
+								UInt64				*outUserDataSize)		API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0));
+
+/*!
     @function	AudioFileGetUserData
     @abstract   Get the data of a chunk in a file.
     @param      inAudioFile			an AudioFileID.
@@ -967,6 +982,25 @@
 						UInt32				inIndex, 
 						UInt32				*ioUserDataSize, 
 						void				*outUserData)					API_AVAILABLE(macos(10.4), ios(2.0), watchos(2.0), tvos(9.0));
+
+/*!
+    @function	AudioFileGetUserDataAtOffset
+    @abstract   Get a part of the data of a chunk in a file.
+    @param      inAudioFile			an AudioFileID.
+    @param      inUserDataID		the four char code of the chunk.
+    @param      inIndex				an index specifying which chunk if there are more than one.
+    @param      inOffset			offset from the first byte of the chunk to the first byte to get.
+    @param      ioUserDataSize		the size of the buffer on input, size of bytes copied to buffer on output
+    @param      outUserData			a pointer to a buffer in which to copy the chunk data.
+    @result							returns noErr if successful.
+*/
+extern OSStatus
+AudioFileGetUserDataAtOffset (	AudioFileID			inAudioFile,
+								UInt32				inUserDataID,
+								UInt32				inIndex,
+								SInt64				inOffset,
+								UInt32				*ioUserDataSize,
+								void				*outUserData)			API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0));
 
 /*!
     @function	AudioFileSetUserData
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFileComponent.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFileComponent.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFileComponent.h	2023-03-09 19:07:14
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFileComponent.h	2023-05-19 22:13:21
@@ -369,6 +369,22 @@
 								UInt32							*outUserDataSize)	API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
 
 /*!
+	@function	AudioFileComponentGetUserDataSize64
+	@abstract   implements AudioFileGetUserDataSize64
+	@param inComponent				an AudioFileComponent
+	@param inUserDataID				the four char code of the chunk.
+	@param inIndex					an index specifying which chunk if there are more than one.
+	@param outUserDataSize			on output, if successful, the size of the user data chunk.
+	@result							returns noErr if successful.
+*/
+extern OSStatus
+AudioFileComponentGetUserDataSize64(
+								AudioFileComponent				inComponent,
+								UInt32							inUserDataID,
+								UInt32							inIndex,
+								UInt64							*outUserDataSize)	API_AVAILABLE(macos(14.0)) API_UNAVAILABLE(ios, watchos, tvos);
+
+/*!
     @function	AudioFileGetUserData
     @abstract   implements AudioFileGetUserData.
     @param		inComponent			an AudioFileComponent
@@ -387,6 +403,26 @@
 								void							*outUserData)	API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
 
 /*!
+    @function	AudioFileComponentGetUserDataAtOffset
+    @abstract   implements AudioFileGetUserDataAtOffset.
+    @param      inComponent			an AudioFileComponent
+    @param      inUserDataID		the four char code of the chunk.
+    @param      inIndex				an index specifying which chunk if there are more than one.
+    @param      inOffset			offset from the first byte of the chunk to the first byte to get.
+    @param      ioUserDataSize		the size of the buffer on input, size of bytes copied to buffer on output
+    @param      outUserData			a pointer to a buffer in which to copy the chunk data.
+    @result							returns noErr if successful.
+*/
+extern OSStatus
+AudioFileComponentGetUserDataAtOffset(
+								AudioFileComponent				inComponent,
+								UInt32							inUserDataID,
+								UInt32							inIndex,
+								SInt64							inOffset,
+								UInt32							*ioUserDataSize,
+								void							*outUserData)			API_AVAILABLE(macos(14.0)) API_UNAVAILABLE(ios, watchos, tvos);
+
+/*!
     @function	AudioFileComponentSetUserData
     @abstract   implements AudioFileSetUserData.
     @param		inComponent			an AudioFileComponent
@@ -626,6 +662,9 @@
 	kAudioFileOpenURLSelect						= 0x001A,
 	kAudioFileFileDataIsThisFormatSelect		= 0x001B,
 	kAudioFileReadPacketDataSelect				= 0x001C,
+
+	kAudioFileGetUserDataSize64Select			= 0x001D,
+	kAudioFileGetUserDataAtOffsetSelect			= 0x001E,
 };
 
 
@@ -936,10 +975,24 @@
 								UInt32							inIndex,
 								UInt32							*outUserDataSize);
 
-typedef	OSStatus	(*AudioFileComponentGetUserDataProc)(	
+typedef	OSStatus	(*AudioFileComponentGetUserDataSize64Proc)(
 								void							*self,
 								UInt32							inUserDataID,
 								UInt32							inIndex,
+								UInt64							*outUserDataSize);
+
+typedef	OSStatus	(*AudioFileComponentGetUserDataProc)(
+								void							*self,
+								UInt32							inUserDataID,
+								UInt32							inIndex,
+								UInt32							*ioUserDataSize,
+								void							*outUserData);
+
+typedef	OSStatus	(*AudioFileComponentGetUserDataAtOffsetProc)(
+								void							*self,
+								UInt32							inUserDataID,
+								UInt32							inIndex,
+								SInt64							inOffset,
 								UInt32							*ioUserDataSize,
 								void							*outUserData);
 
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioQueue.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioQueue.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioQueue.h	2023-03-09 19:12:26
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioQueue.h	2023-05-24 02:41:43
@@ -516,6 +516,18 @@
     UInt32                          mPacketDescriptionCount;
 #ifdef __cplusplus
     AudioQueueBuffer() : mAudioDataBytesCapacity(0), mAudioData(0), mPacketDescriptionCapacity(0), mPacketDescriptions(0) { }
+
+	AudioQueueBuffer(void* dataPtr, UInt32 dataCapacity, AudioStreamPacketDescription* packetDescs,
+		UInt32 packetDescCapacity)
+		: mAudioDataBytesCapacity(dataCapacity),
+		  mAudioData(dataPtr),
+		  mAudioDataByteSize(0),
+		  mUserData(nullptr),
+		  mPacketDescriptionCapacity(packetDescCapacity),
+		  mPacketDescriptions(packetDescs),
+		  mPacketDescriptionCount(0)
+	{
+	}
 #endif
 } AudioQueueBuffer;
 
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnitProperties.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnitProperties.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnitProperties.h	2023-03-09 23:52:05
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnitProperties.h	2023-05-24 02:47:48
@@ -52,7 +52,10 @@
 #define AudioToolbox_AudioUnitProperties_h
 
 #include <AudioToolbox/AUComponent.h>
+
+#if !(0 && 0)
 #include <os/workgroup.h>
+#endif
 
 CF_ASSUME_NONNULL_BEGIN
 
@@ -812,14 +815,17 @@
 						    with the audio data it is generating in the current call to the AudioUnitRender function
 
 						Host should setup in the following order:
-						- Set host desired MIDIProtocolID
+						- Set desired host MIDI protocol using kAudioUnitProperty_HostMIDIProtocol
 						- Set kAudioUnitProperty_MIDIOutputEventListCallback
 						- Initialize the Audio Unit
  
 						Notes:
-							- kAudioUnitProperty_HostMIDIProtocol can not be changed while the Audio Unit is initialized.
-							- The Audio Unit takes ownership of the provided block.
-
+						- kAudioUnitProperty_HostMIDIProtocol cannot be changed while the Audio Unit is initialized.
+						- The Audio Unit takes ownership of the provided block.
+						- kAudioUnitProperty_HostMIDIProtocol should be set before attempting to query
+						kAudioUnitProperty_AudioUnitMIDIProtocol or calling AudioUnitInitialize to allow Audio Units to
+						optionally match their input MIDI protocol to the desired host protocol and prevent protocol conversion.
+ 
 						There is no implied or expected association between the number (or position) of an audio unit's
 						audio or MIDI outputs.
  
@@ -849,8 +855,17 @@
 						Hosts should set this property to the protocol that MIDI data is desired to be delivered in. The framework will
 						convert all MIDI data sent to the host to the protocol value set in this property, an audio unit can query
 						this property to detect the hosts MIDI protocol.
+ 
+						Host should setup in the following order:
+						- Set desired host MIDI protocol using kAudioUnitProperty_HostMIDIProtocol
+						- Set kAudioUnitProperty_MIDIOutputEventListCallback
+						- Initialize the Audio Unit
 
-						Note: This property should not be changed after the audio unit has been initialized.
+						Notes:
+						- kAudioUnitProperty_HostMIDIProtocol cannot be changed after the audio unit has been initialized.
+						- kAudioUnitProperty_HostMIDIProtocol should be set before attempting to query
+						kAudioUnitProperty_AudioUnitMIDIProtocol or calling AudioUnitInitialize to allow Audio Units to
+						optionally match their input MIDI protocol to the desired host protocol and prevent protocol conversion.
 
 	@constant        kAudioUnitProperty_MIDIOutputBufferSizeHint
 						Scope:                  Global
@@ -1266,7 +1281,7 @@
 };
 typedef struct AUDependentParameter AUDependentParameter;
 
-
+#if !(0 && 0)
 #if !TARGET_OS_IPHONE
 /*!
 	@struct			AudioUnitCocoaViewInfo
@@ -1292,6 +1307,7 @@
 };
 typedef struct AUHostVersionIdentifier AUHostVersionIdentifier;
 #endif //!TARGET_OS_IPHONE
+#endif 
 
 /*!
 	@struct			MIDIPacketList
@@ -1353,6 +1369,7 @@
 	
 	See AURenderContextObserver.
 */
+#if !(0 && 0)
 struct AudioUnitRenderContext {
 	os_workgroup_t __nullable		workgroup;
 	uint32_t						reserved[6]; // must be zero
@@ -1385,7 +1402,7 @@
 */
 typedef void (^AURenderContextObserver)(const AudioUnitRenderContext *context)
 	__SWIFT_UNAVAILABLE_MSG("Swift is not supported for use with audio realtime threads");
-
+#endif 
 /*!
 	@struct         MIDIEventList
 	@abstract       Forward declaration of MIDIEventList found in <CoreMIDI/MIDIServices.h>
@@ -1831,6 +1848,17 @@
 
 #define kAudioUnitConfigurationInfo_MigrateFromPlugin	"MigrateFromPlugin"
 
+#if !TARGET_OS_IPHONE
+
+/*!
+ @define		kAudioUnitConfigurationInfo_AvailableArchitectures
+ @discussion	An array of NSStrings representing the plugin architectures available in the bundle. Only available on macOS.
+ */
+
+#define kAudioUnitConfigurationInfo_AvailableArchitectures	"AvailableArchitectures"
+
+#endif // !TARGET_OS_IPHONE
+
 #pragma mark -
 #pragma mark OS X Availability
 
@@ -2585,7 +2613,7 @@
 	@discussion			Scope: Global
 						Value Type: UInt32
 						Access: read/write
-							Bypass all processing done by the voice processing unit. When set to 0 
+							Bypass all processing for microphone uplink done by the voice processing unit. When set to 0
 							(default), the processing is activated otherwise it is disabled. Voice Isolation
                             and Wide Spectrum take priority over Bypass.
 
@@ -2593,15 +2621,15 @@
 	@discussion			Scope: Global
 						Value Type: UInt32
 						Access: read/write
-							Enable automatic gain control on the processed microphone/uplink 
+							Enable automatic gain control on the processed microphone uplink
                             signal. On by default.
  
 	 @constant		kAUVoiceIOProperty_MuteOutput
 	 @discussion		Scope: Global
 						Value Type: UInt32
 						Access: read/write
-							Mutes the output of the voice processing unit. 
-							0 (default) = muting off. 1 = mute output.  
+							Mutes the output of the processed microphone uplink
+							0 (default) = muting off. 1 = muting on.
 */
 CF_ENUM(AudioUnitPropertyID) {
 	kAUVoiceIOProperty_BypassVoiceProcessing		= 2100,
@@ -2636,8 +2664,54 @@
  */
 CF_ENUM(AudioUnitPropertyID) {
 	kAUVoiceIOProperty_MutedSpeechActivityEventListener = 2106
-} API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, watchos, tvos, macCatalyst);
+} API_AVAILABLE(ios(15.0), macos(14.0), tvos(17.0)) API_UNAVAILABLE(watchos);
 
+
+/*!
+	@enum	AUVoiceIOOtherAudioDuckingLevel
+	@abstract Ducking level applied to other (i.e. non-voice) audio by AUVoiceIO.
+	@discussion
+			DuckingLevelDefault = Default ducking level to other audio for typical voice chat.
+			DuckingLevelMin = minimum ducking to other audio.
+			DuckingLevelMid = medium ducking to other audio.
+			DuckingLevelMax = maximum ducking to other audio.
+*/
+typedef CF_ENUM(UInt32, AUVoiceIOOtherAudioDuckingLevel) {
+	kAUVoiceIOOtherAudioDuckingLevelDefault = 0,
+	kAUVoiceIOOtherAudioDuckingLevelMin = 10,
+	kAUVoiceIOOtherAudioDuckingLevelMid = 20,
+	kAUVoiceIOOtherAudioDuckingLevelMax = 30
+};
+
+/*!
+	@struct          AUVoiceIOOtherAudioDuckingConfiguration
+	@abstract        The configuration of ducking other (i.e. non-voice) audio
+ 
+	@var             mEnableAdvancedDucking
+                         Enables advanced ducking which ducks other audio based on the presence of voice activity from local and/or remote chat participants.
+	@var             mDuckingLevel
+                         Ducking level of other audio
+*/
+struct AUVoiceIOOtherAudioDuckingConfiguration {
+	Boolean            mEnableAdvancedDucking;
+	AUVoiceIOOtherAudioDuckingLevel  mDuckingLevel;
+};
+typedef struct AUVoiceIOOtherAudioDuckingConfiguration AUVoiceIOOtherAudioDuckingConfiguration;
+
+/*!
+	@constant kAUVoiceIOProperty_OtherAudioDuckingConfiguration
+	@discussion	Scope: Global
+				Value Type: AUVoiceIOOtherAudioDuckingConfiguration
+				Access: read/write
+               
+				Configures the ducking of other (i.e. non-voice) audio, including advanced ducking enablement and ducking level.
+				In general, when other audio is played during voice chat, applying a higher level of ducking could increase the intelligibility of the voice chat.
+				If not set, the default ducking configuration is to disable advanced ducking, with a ducking level set to kAUVoiceIOOtherAudioDuckingLevelDefault.
+ */
+CF_ENUM(AudioUnitPropertyID) {
+	kAUVoiceIOProperty_OtherAudioDuckingConfiguration =  2108
+} API_AVAILABLE(ios(17.0), macos(14.0)) API_UNAVAILABLE(watchos, tvos);
+
 #pragma mark - AUVoiceProcessing unit deprecated properties
 
 #if TARGET_OS_IPHONE
@@ -2898,7 +2972,6 @@
                         Access:         Read / Write
     @discussion     Sets personalized head-related transfer function (HRTF) mode for spatial audio rendering
                     with kSpatializationAlgorithm_UseOutputType and kSpatialMixerOutputType_Headphones.
-                    This property becomes read-only if personalized HRTF is unavailable or unsupported.
     @seealso        AUSpatialMixerPersonalizedHRTFMode
 
 */
@@ -3682,6 +3755,7 @@
 						For the preset instruments, the numeric ID of a particular preset within that bank to load.
  						Range is 0 to 127.
  */
+#if !(0 && 0)
 struct AUSamplerInstrumentData {
 	CFURLRef				fileURL;
 	UInt8					instrumentType;
@@ -3690,6 +3764,7 @@
 	UInt8					presetID;
 };
 typedef struct AUSamplerInstrumentData AUSamplerInstrumentData;
+#endif 
 
 /*
 	@enum			InstrumentTypes
@@ -4037,7 +4112,7 @@
 
 // Deprecated in favor of the newer AUSamplerInstrumentData
 // structure and its supporting property.
-
+#if !(0 && 0)
 typedef struct AUSamplerBankPresetData {
 	CFURLRef				bankURL;
 	UInt8					bankMSB;
@@ -4045,6 +4120,7 @@
 	UInt8					presetID;
 	UInt8					reserved;
 } AUSamplerBankPresetData;
+#endif 
 
 CF_ENUM(AudioUnitPropertyID) {
 	kAUSamplerProperty_LoadPresetFromBank			= 4100,
Clone this wiki locally