-
Notifications
You must be signed in to change notification settings - Fork 578
AVFAudio macOS xcode27.0 b1
Alex Soto edited this page Jun 9, 2026
·
1 revision
#AVFAudio.framework
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioConnectionPoint.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioConnectionPoint.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioConnectionPoint.h 2026-04-18 23:16:03
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioConnectionPoint.h 2026-05-22 08:28:50
@@ -19,7 +19,7 @@
Instances of this class are immutable.
*/
-API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AVAudioConnectionPoint : NSObject {
@private
AVAudioNode *_node;
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioConverter.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioConverter.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioConverter.h 2026-04-18 21:41:01
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioConverter.h 2026-05-22 08:25:33
@@ -151,14 +151,13 @@
convertToBuffer:error:withInputFromBlock: will return as much output as could be converted
with the input already supplied.
*/
-typedef AVAudioBuffer * __nullable (^ NS_SWIFT_SENDABLE AVAudioConverterInputBlock)(AVAudioPacketCount inNumberOfPackets, AVAudioConverterInputStatus* outStatus);
+typedef AVAudioBuffer * __nullable (^ NS_SWIFT_NONSENDABLE AVAudioConverterInputBlock)(AVAudioPacketCount inNumberOfPackets, AVAudioConverterInputStatus* outStatus);
/*!
@class AVAudioConverter
@abstract
Converts streams of audio between various formats.
*/
-NS_SWIFT_SENDABLE
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AVAudioConverter : NSObject {
@private
@@ -301,7 +300,7 @@
It attempts to fill the buffer to its capacity. On return, the buffer's length indicates the number of
sample frames successfully converted.
*/
-- (AVAudioConverterOutputStatus)convertToBuffer:(AVAudioBuffer *)outputBuffer error:(NSError **)outError withInputFromBlock:(AVAudioConverterInputBlock)inputBlock;
+- (AVAudioConverterOutputStatus)convertToBuffer:(AVAudioBuffer *)outputBuffer error:(NSError **)outError withInputFromBlock:(NS_NOESCAPE AVAudioConverterInputBlock)inputBlock;
@end
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioEngine.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioEngine.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioEngine.h 2026-04-18 19:16:24
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioEngine.h 2026-05-22 05:24:21
@@ -135,9 +135,21 @@
In such a case, the client could implement their own synchronization between their realtime
and non-realtime threads and retry calling `AVAudioEngineManualRenderingBlock`.
*/
-typedef AVAudioEngineManualRenderingStatus (^AVAudioEngineManualRenderingBlock)(AVAudioFrameCount numberOfFrames, AudioBufferList *outBuffer, OSStatus * __nullable outError) API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
+typedef AVAudioEngineManualRenderingStatus (^ NS_SWIFT_NONSENDABLE AVAudioEngineManualRenderingBlock)(AVAudioFrameCount numberOfFrames, AudioBufferList *outBuffer, OSStatus * __nullable outError) API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/*!
+ @typedef AVMIDIEventListBlock
+ @abstract A block used by an audio unit to send or receive MIDIEventList data.
+ @param eventSampleTime
+ The time in samples at which the MIDI events are to occur.
+ @param cable
+ The virtual cable number associated with this MIDI data.
+ @param eventList
+ One full MIDI, partial MIDI SysEx, or a full SysEx UMP message.
+*/
+typedef OSStatus (^ NS_SWIFT_NONSENDABLE AVMIDIEventListBlock)(SInt64 eventSampleTime, UInt8 cable, const struct MIDIEventList* eventList) CA_REALTIME_API API_AVAILABLE(macos(27.0), ios(27.0), tvos(27.0), watchos(27.0));
+
+/*!
@class AVAudioEngine
An AVAudioEngine contains a group of connected AVAudioNodes ("nodes"), each of which performs
@@ -157,7 +169,7 @@
audio device and rendering in response to requests from the client, normally at or
faster than realtime rate.
*/
-API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@interface AVAudioEngine : NSObject {
@private
void *_impl;
@@ -227,8 +239,37 @@
Note that any pre-existing connection(s) involving the source's output bus or the
destination's input bus will be broken.
*/
-- (void)connect:(AVAudioNode *)node1 to:(AVAudioNode *)node2 fromBus:(AVAudioNodeBus)bus1 toBus:(AVAudioNodeBus)bus2 format:(AVAudioFormat * __nullable)format;
+- (void)connect:(AVAudioNode *)node1 to:(AVAudioNode *)node2 fromBus:(AVAudioNodeBus)bus1 toBus:(AVAudioNodeBus)bus2 format:(AVAudioFormat * __nullable)format API_DEPRECATED_WITH_REPLACEMENT("connect:to:fromBus:toBus:format:error:", ios(8.0, 27.0), watchos(2.0, 27.0), macos(10.10, 27.0), tvos(9.0, 27.0));
+/*! @method connect:to:fromBus:toBus:format:error
+ @abstract
+ Establish a connection between two nodes.
+ @param node1
+ The source node
+ @param node2
+ The destination node
+ @param bus1
+ The output bus on the source node
+ @param bus2
+ The input bus on the destination node
+ @param format
+ If non-nil, the format of the source node's output bus is set to this
+ format. In all cases, the format of the destination node's input bus is set to
+ match that of the source node's output bus.
+ @param error
+ on exit, if an error occurs, a description of the error
+ @return
+ YES for success
+
+ Nodes have input and output buses (AVAudioNodeBus). Use this method to establish
+ one-to-one connections betweeen nodes. Connections made using this method are always
+ one-to-one, never one-to-many or many-to-one.
+
+ Note that any pre-existing connection(s) involving the source's output bus or the
+ destination's input bus will be broken.
+*/
+- (BOOL)connect:(AVAudioNode *)node1 to:(AVAudioNode *)node2 fromBus:(AVAudioNodeBus)bus1 toBus:(AVAudioNodeBus)bus2 format:(AVAudioFormat * __nullable)format error:(NSError**)error NS_SWIFT_NAME(connectNode(_:to:fromBus:toBus:format:)) API_AVAILABLE(macos(27.0), ios(27.0), watchos(27.0), tvos(27.0));
+
/*! @method connect:to:format:
@abstract
Establish a connection between two nodes
@@ -237,8 +278,22 @@
and bus 0 on the destination node, except in the case of a destination which is a mixer,
in which case the destination is the mixer's nextAvailableInputBus.
*/
-- (void)connect:(AVAudioNode *)node1 to:(AVAudioNode *)node2 format:(AVAudioFormat * __nullable)format;
+- (void)connect:(AVAudioNode *)node1 to:(AVAudioNode *)node2 format:(AVAudioFormat * __nullable)format API_DEPRECATED_WITH_REPLACEMENT("connect:to:format:error:", ios(8.0, 27.0), watchos(2.0, 27.0), macos(10.10, 27.0), tvos(9.0, 27.0));
+/*! @method connect:to:format:error:
+ @abstract
+ Establish a connection between two nodes
+ @param error
+ on exit, if an error occurs, a description of the error
+ @return
+ YES for success
+
+ This calls connect:to:fromBus:toBus:format: using bus 0 on the source node,
+ and bus 0 on the destination node, except in the case of a destination which is a mixer,
+ in which case the destination is the mixer's nextAvailableInputBus.
+*/
+- (BOOL)connect:(AVAudioNode *)node1 to:(AVAudioNode *)node2 format:(AVAudioFormat * __nullable)format error:(NSError**)error NS_SWIFT_NAME(connectNode(_:to:format:)) API_AVAILABLE(macos(27.0), ios(27.0), watchos(27.0), tvos(27.0));
+
/*! @method connect:toConnectionPoints:fromBus:format:
@abstract
Establish connections between a source node and multiple destination nodes.
@@ -274,8 +329,49 @@
- any AVAudioUnitTimeEffect
- any sample rate conversion
*/
-- (void)connect:(AVAudioNode *)sourceNode toConnectionPoints:(NSArray *)destNodes fromBus:(AVAudioNodeBus)sourceBus format:(AVAudioFormat * __nullable)format API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
+- (void)connect:(AVAudioNode *)sourceNode toConnectionPoints:(NSArray *)destNodes fromBus:(AVAudioNodeBus)sourceBus format:(AVAudioFormat * __nullable)format API_DEPRECATED_WITH_REPLACEMENT("connect:toConnectionPoints:fromBus:format:error:", ios(9.0, 27.0), watchos(2.0, 27.0), macos(10.11, 27.0), tvos(9.0, 27.0));
+/*! @method connect:toConnectionPoints:fromBus:format:error:
+ @abstract
+ Establish connections between a source node and multiple destination nodes.
+ @param sourceNode
+ The source node
+ @param destNodes
+ An array of AVAudioConnectionPoint objects specifying destination
+ nodes and busses
+ @param sourceBus
+ The output bus on source node
+ @param format
+ If non-nil, the format of the source node's output bus is set to this
+ format. In all cases, the format of the destination nodes' input bus is set to
+ match that of the source node's output bus
+ @param error
+ on exit, if an error occurs, a description of the error
+ @return
+ YES for success
+
+ Use this method to establish connections from a source node to multiple destination nodes.
+ Connections made using this method are either one-to-one (when a single destination
+ connection is specified) or one-to-many (when multiple connections are specified), but
+ never many-to-one.
+
+ To incrementally add a new connection to a source node, use this method with an array
+ of AVAudioConnectionPoint objects comprising of pre-existing connections (obtained from
+ `outputConnectionPointsForNode:outputBus:`) and the new connection.
+
+ Note that any pre-existing connection involving the destination's input bus will be
+ broken. And, any pre-existing connection on source node which is not a part of the
+ specified destination connection array will also be broken.
+
+ Also note that when the output of a node is split into multiple paths, all the paths
+ must render at the same rate until they reach a common mixer.
+ In other words, starting from the split node until the common mixer node where all split
+ paths terminate, you cannot have:
+ - any AVAudioUnitTimeEffect
+ - any sample rate conversion
+*/
+- (BOOL)connect:(AVAudioNode *)sourceNode toConnectionPoints:(NSArray *)destNodes fromBus:(AVAudioNodeBus)sourceBus format:(AVAudioFormat * __nullable)format error:(NSError**)error NS_SWIFT_NAME(connectNode(_:to:fromBus:format:)) API_AVAILABLE(macos(27.0), ios(27.0), watchos(27.0), tvos(27.0));
+
/*! @method disconnectNodeInput:bus:
@abstract
Remove a connection between two nodes.
@@ -424,7 +520,7 @@
@abstract
The MusicSequence previously attached to the engine (if any).
*/
-@property (nonatomic, nullable) MusicSequence musicSequence;
+@property (nonatomic, nullable) MusicSequence musicSequence NS_REFINED_FOR_SWIFT;
#endif
/*! @property outputNode
@@ -748,8 +844,41 @@
Any client installed block on the source node's audio unit `AUMIDIOutputEventListBlock`
will be overwritten when making the MIDI connection.
*/
-- (void)connectMIDI:(AVAudioNode *)sourceNode to:(AVAudioNode *)destinationNode format:(AVAudioFormat * __nullable)format eventListBlock:(AUMIDIEventListBlock __nullable)tapBlock API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+- (void)connectMIDI:(AVAudioNode *)sourceNode to:(AVAudioNode *)destinationNode format:(AVAudioFormat * __nullable)format eventListBlock:(AUMIDIEventListBlock __nullable)tapBlock __attribute__((swift_attr("@_disfavoredOverload"))) API_DEPRECATED_WITH_REPLACEMENT("connectMIDI:to:format:eventListProvider:", macos(13.0, 27.0), ios(16.0, 27.0), watchos(9.0, 27.0), tvos(16.0, 27.0));
+/*! @method connectMIDI:to:format:eventListProvider:
+ @abstract
+ Establish a MIDI only connection between two nodes.
+ @param sourceNode
+ The source node.
+ @param destinationNode
+ The destination node.
+ @param format
+ If non-nil, the format of the source node's output bus is set to this format.
+ In all cases, the format of the source nodes' output bus has to match with the
+ destination nodes' output bus format.
+ Although the output bus of the source is not in use, the format needs to be set
+ in order to be able to use the sample rate for MIDI event timing calculations.
+ @param tapBlock
+ This block is called from the source node's `AUMIDIOutputEventListBlock`
+ on the realtime thread. The host can tap the MIDI data of the source node through
+ this block.
+
+ Use this method to establish a MIDI only connection between a source node and a
+ destination node that has MIDI input capability.
+
+ The source node can only be a AVAudioUnit node of type `kAudioUnitType_MIDIProcessor`.
+ The destination node types can be `kAudioUnitType_MusicDevice`,
+ `kAudioUnitType_MusicEffect` or `kAudioUnitType_MIDIProcessor`.
+
+ Note that any pre-existing MIDI connection involving the destination will be broken.
+
+ Any client installed block on the source node's audio unit `AUMIDIOutputEventListBlock`
+ will be overwritten when making the MIDI connection.
+ */
+
+- (void)connectMIDI:(AVAudioNode *)sourceNode to:(AVAudioNode *)destinationNode format:(AVAudioFormat * __nullable)format eventListProvider:(AVMIDIEventListBlock __nullable)tapBlock API_AVAILABLE(macos(27.0), ios(27.0), tvos(27.0), watchos(27.0));
+
/*! @method connectMIDI:toNodes:format:block:
@abstract
Establish a MIDI only connection between a source node and multiple destination nodes.
@@ -820,7 +949,43 @@
Any client installed block on the source node's audio unit `AUMIDIOutputEventListBlock`
will be overwritten when making the MIDI connection.
*/
-- (void)connectMIDI:(AVAudioNode *)sourceNode toNodes:(NSArray *)destinationNodes format:(AVAudioFormat * __nullable)format eventListBlock:(AUMIDIEventListBlock __nullable)tapBlock API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+- (void)connectMIDI:(AVAudioNode *)sourceNode toNodes:(NSArray *)destinationNodes format:(AVAudioFormat * __nullable)format eventListBlock:(AUMIDIEventListBlock __nullable)tapBlock __attribute__((swift_attr("@_disfavoredOverload"))) API_DEPRECATED_WITH_REPLACEMENT("connectMIDI:toNodes:format:eventListProvider:", macos(13.0, 27.0), ios(16.0, 27.0), watchos(9.0, 27.0), tvos(16.0, 27.0));
+
+/*! @method connectMIDI:toNodes:format:eventListProvider:
+ @abstract
+ Establish a MIDI only connection between a source node and multiple destination nodes.
+ @param sourceNode
+ The source node.
+ @param destinationNodes
+ An array of AVAudioNodes specifying destination nodes.
+ @param format
+ If non-nil, the format of the source node's output bus is set to this format.
+ In all cases, the format of the source nodes' output bus has to match with the
+ destination nodes' output bus format.
+ Although the output bus of the source is not in use, the format needs to be set
+ in order to be able to use the sample rate for MIDI event timing calculations.
+ @param tapBlock
+ This block is called from the source node's `AUMIDIOutputEventListBlock`
+ on the realtime thread. The host can tap the MIDI data of the source node through
+ this block.
+
+ Use this method to establish a MIDI only connection between a source node and
+ multiple destination nodes.
+
+ The source node can only be a AVAudioUnit node of type `kAudioUnitType_MIDIProcessor`.
+ The destination node types can be `kAudioUnitType_MusicDevice`,
+ `kAudioUnitType_MusicEffect` or `kAudioUnitType_MIDIProcessor`.
+
+ MIDI connections made using this method are either one-to-one (when a single
+ destination connection is specified) or one-to-many (when multiple connections are
+ specified), but never many-to-one.
+
+ Note that any pre-existing connection involving the destination will be broken.
+
+ Any client installed block on the source node's audio unit `AUMIDIOutputEventListBlock`
+ will be overwritten when making the MIDI connection.
+ */
+- (void)connectMIDI:(AVAudioNode *)sourceNode toNodes:(NSArray *)destinationNodes format:(AVAudioFormat * __nullable)format eventListProvider:(AVMIDIEventListBlock __nullable)tapBlock API_AVAILABLE(macos(27.0), ios(27.0), tvos(27.0), watchos(27.0));
/*! @method disconnectMIDI:from:
@abstract
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioEnvironmentNode.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioEnvironmentNode.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioEnvironmentNode.h 2026-04-18 22:05:10
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioEnvironmentNode.h 2026-05-23 02:50:53
@@ -50,7 +50,7 @@
A standalone instance of AVAudioEnvironmentDistanceAttenuationParameters cannot be created.
Only an instance vended out by a source object (e.g. AVAudioEnvironmentNode) can be used.
*/
-API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@interface AVAudioEnvironmentDistanceAttenuationParameters : NSObject {
@private
void *_impl;
@@ -113,7 +113,7 @@
Only an instance vended out by a source object (e.g. AVAudioEnvironmentNode) can be used.
*/
-API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@interface AVAudioEnvironmentReverbParameters : NSObject {
@private
void *_impl;
@@ -205,7 +205,7 @@
with a desired AudioChannelLayout.
*/
-API_AVAILABLE(macos(10.10), ios(8.0), tvos(9.0)) API_UNAVAILABLE(watchos)
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), tvos(9.0)) API_UNAVAILABLE(watchos)
@interface AVAudioEnvironmentNode : AVAudioNode
- (instancetype)init NS_DESIGNATED_INITIALIZER;
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioFile.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioFile.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioFile.h 2026-04-18 21:41:01
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioFile.h 2026-05-22 08:25:33
@@ -25,7 +25,7 @@
Reads and writes are always sequential, but random access is possible by setting the
framePosition property.
*/
-NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
+API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@interface AVAudioFile : NSObject
- (instancetype)init API_DEPRECATED("Deprecated - use initForReading or initForWriting", macos(10.10, 26.0), ios(8.0, 26.0), watchos(2.0, 26.0), tvos(9.0, 26.0), macCatalyst(10.10, 26.0));
@@ -133,6 +133,10 @@
YES for success.
@discussion
Like `readIntoBuffer:error:`, but can be used to read fewer frames than buffer.frameCapacity.
+
+ Starting in macOS 27.0, iOS 27.0, watchOS 27.0, and tvOS 27.0, attempting to read beyond the
+ end of the file will return NO and set outError to an NSError with domain NSOSStatusErrorDomain
+ and code kAudioFileEndOfFileError.
*/
- (BOOL)readIntoBuffer:(AVAudioPCMBuffer *)buffer frameCount:(AVAudioFrameCount)frames error:(NSError **)outError;
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioFormat.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioFormat.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioFormat.h 2026-04-18 22:05:10
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioFormat.h 2026-05-22 05:36:49
@@ -7,7 +7,7 @@
#import
-#if __has_include() && !0
+#if __has_include() && !0 && !0
#define AVAUDIOFORMAT_HAVE_CMFORMATDESCRIPTION 1
#import
#endif
@@ -45,7 +45,7 @@
Instances of this class are immutable.
*/
-NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
+API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@interface AVAudioFormat : NSObject {
@private
AudioStreamBasicDescription _asbd;
@@ -148,7 +148,18 @@
@discussion
If formatDescription is invalid, this method fails (returns nil).
*/
-- (instancetype)initWithCMAudioFormatDescription:(CMAudioFormatDescriptionRef)formatDescription API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
+- (instancetype)initWithCMAudioFormatDescription:(CMAudioFormatDescriptionRef)formatDescription API_DEPRECATED_WITH_REPLACEMENT("initWithFormatDescription:", macos(10.11, 27.0), ios(9.0, 27.0), watchos(2.0, 27.0), tvos(9.0, 27.0));
+
+/*!
+ @method initWithFormatDescription:
+ @abstract initialize from a CMAudioFormatDescriptionRef.
+ @param formatDescription
+ the CMAudioFormatDescriptionRef.
+ @discussion
+ If formatDescription is invalid, this method fails (returns nil).
+ */
+- (nullable instancetype)initWithFormatDescription:(CMAudioFormatDescriptionRef)formatDescription API_AVAILABLE(macos(27), ios(27), watchos(27), tvos(27));
+
#endif
/*! @method isEqual:
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioIONode.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioIONode.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioIONode.h 2026-04-18 19:21:10
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioIONode.h 2026-05-22 05:43:57
@@ -35,11 +35,20 @@
Note that when the engine is configured to operate in
`AVAudioEngineManualRenderingModeRealtime`, this block will be called from a realtime
- context. Care should be taken not to make any blocking call (e.g. calling libdispatch,
+ context and using AVAudioIONodeInputBlockRealtimeSafe is preferred.
+ Care should be taken not to make any blocking call (e.g. calling libdispatch,
blocking on a mutex, allocating memory etc.) which may cause an overload at the lower layers.
*/
-typedef const AudioBufferList * __nullable (^AVAudioIONodeInputBlock)(AVAudioFrameCount inNumberOfFrames) API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
+typedef const AudioBufferList * __nullable (^ NS_SWIFT_NONSENDABLE AVAudioIONodeInputBlock)(AVAudioFrameCount inNumberOfFrames) API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
+/*! @typedef AVAudioIONodeInputBlockRealtimeSafe
+ @abstract
+ Identical to AVAudioIONodeInputBlock, with the addition of a realtime-safety guarantee.
+ When the engine is configured to operate in `AVAudioEngineManualRenderingModeRealtime`,
+ use of this block is preferred.
+*/
+typedef const AudioBufferList * __nullable (^AVAudioIONodeInputBlockRealtimeSafe)(AVAudioFrameCount inNumberOfFrames) CA_REALTIME_API API_AVAILABLE(macos(27.0), ios(27.0), watchos(27.0), tvos(27.0), visionos(27.0)) __SWIFT_UNAVAILABLE_MSG("Swift is not supported for use with audio realtime threads");
+
/*!
@enum AVAudioVoiceProcessingSpeechActivityEvent
@abstract Types of speech activity events.
@@ -100,7 +109,7 @@
In the manual rendering mode, the AVAudioInputNode and AVAudioOutputNode perform the input
and output in the engine, in response to client's request.
*/
-API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@interface AVAudioIONode : AVAudioNode
/*! @property presentationLatency
@@ -120,7 +129,7 @@
@discussion
This is only necessary for certain advanced usages.
*/
-@property (nonatomic, readonly, nullable) AudioUnit audioUnit;
+@property (nonatomic, readonly, nullable) AudioUnit audioUnit NS_REFINED_FOR_SWIFT;
#endif
/*! @property voiceProcessingEnabled
@@ -179,7 +188,7 @@
In the manual rendering mode, the format of the output scope is initially the same as that
of the input, but you may set it to a different format, in which case the node will convert.
*/
-API_AVAILABLE(macos(10.10), ios(8.0), watchos(4.0), tvos(11.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(4.0), tvos(11.0))
@interface AVAudioInputNode : AVAudioIONode
- (instancetype)init NS_UNAVAILABLE; // fetch instance via -[AVAudioEngine inputNode].
@@ -201,6 +210,13 @@
*/
- (BOOL)setManualRenderingInputPCMFormat:(AVAudioFormat *)format inputBlock:(AVAudioIONodeInputBlock)block API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
+/*! @method setRealtimeSafeManualRenderingInputPCMFormat:inputBlock:
+ @abstract
+ Identical to setManualRenderingInputPCMFormat:inputBlock:, but requires a realtime-safe
+ input block.
+*/
+- (BOOL)setRealtimeSafeManualRenderingInputPCMFormat:(AVAudioFormat *)format inputBlock:(AVAudioIONodeInputBlockRealtimeSafe)block API_AVAILABLE(macos(27.0), ios(27.0), watchos(27.0), tvos(27.0), visionos(27.0)) __SWIFT_UNAVAILABLE_MSG("Swift is not supported for use with audio realtime threads");
+
/*! @property voiceProcessingBypassed
@abstract
Bypass all processing for microphone uplink done by the voice processing unit.
@@ -238,7 +254,7 @@
Continuous presence of or lack of speech activity during mute will not cause redundant notification.
In order to use this API, it's expected to implement the mute via the voiceProcessingInputMuted.
*/
-- (BOOL)setMutedSpeechActivityEventListener:(nullable void (^)(AVAudioVoiceProcessingSpeechActivityEvent event))listenerBlock API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos);
+- (BOOL)setMutedSpeechActivityEventListener:(nullable void (^ NS_SWIFT_SENDABLE)(AVAudioVoiceProcessingSpeechActivityEvent event))listenerBlock API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos);
/*! @property voiceProcessingOtherAudioDuckingConfiguration
@abstract
@@ -270,7 +286,7 @@
The format of the input scope is initially the same as that of the
output, but you may set it to a different format, in which case the node will convert.
*/
-API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@interface AVAudioOutputNode : AVAudioIONode
- (instancetype)init NS_UNAVAILABLE; // fetch instance via -[AVAudioEngine outputNode].
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioMixerNode.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioMixerNode.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioMixerNode.h 2026-04-18 23:16:02
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioMixerNode.h 2026-05-22 08:28:49
@@ -19,7 +19,7 @@
conversions. It also accepts any channel count and will correctly upmix or downmix
to the output channel count.
*/
-API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@interface AVAudioMixerNode : AVAudioNode
- (instancetype)init NS_DESIGNATED_INITIALIZER;
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioMixing.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioMixing.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioMixing.h 2026-04-18 21:43:23
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioMixing.h 2026-05-22 05:24:21
@@ -42,7 +42,7 @@
For example, an AVAudioPlayerNode that is being used in a gaming scenario can set up its
3D mixing settings and then move from one environment to another.
*/
-API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@protocol AVAudioMixing
/*! @abstract Returns the AVAudioMixingDestination object corresponding to specified mixer node and
@@ -85,7 +85,7 @@
/*! @protocol AVAudioStereoMixing
@abstract Protocol that defines stereo mixing properties
*/
-API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@protocol AVAudioStereoMixing
/*! @property pan
@@ -223,6 +223,7 @@
/*! @protocol AVAudio3DMixing
@abstract Protocol that defines 3D mixing properties
*/
+NS_SWIFT_SENDABLE
@protocol AVAudio3DMixing
/*! @property renderingAlgorithm
@@ -319,7 +320,7 @@
Only an instance vended by a source node (e.g. AVAudioPlayerNode) can be used
(see `AVAudioMixing`).
*/
-API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AVAudioMixingDestination : NSObject {
@private
void *_impl;
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioNode.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioNode.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioNode.h 2026-04-18 21:43:24
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioNode.h 2026-05-22 05:24:22
@@ -29,7 +29,7 @@
@discussion
CAUTION: This callback may be invoked on a thread other than the main thread.
*/
-typedef void (^AVAudioNodeTapBlock)(AVAudioPCMBuffer *buffer, AVAudioTime *when);
+typedef void (^ NS_SWIFT_NONSENDABLE AVAudioNodeTapBlock)(AVAudioPCMBuffer *buffer, AVAudioTime *when);
/*!
@class AVAudioNode
@@ -48,7 +48,7 @@
Nodes do not currently provide useful functionality until attached to an engine.
*/
-API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
+NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@interface AVAudioNode : NSObject {
@protected
void *_impl;
@@ -114,13 +114,57 @@
// start engine
*/
-- (void)installTapOnBus:(AVAudioNodeBus)bus bufferSize:(AVAudioFrameCount)bufferSize format:(AVAudioFormat * __nullable)format block:(AVAudioNodeTapBlock)tapBlock;
+- (void)installTapOnBus:(AVAudioNodeBus)bus bufferSize:(AVAudioFrameCount)bufferSize format:(AVAudioFormat * __nullable)format block:(AVAudioNodeTapBlock)tapBlock API_DEPRECATED_WITH_REPLACEMENT("installTapOnBus:bufferSize:format:error:block", ios(8.0, 27.0), watchos(2.0, 27.0), macos(10.10, 27.0), tvos(9.0, 27.0));
+/*! @method installTapOnBus:bufferSize:forma:errort:block:
+ @abstract Create a "tap" to record/monitor/observe the output of the node.
+ @param bus
+ the node output bus to which to attach the tap
+ @param bufferSize
+ the requested size of the incoming buffers in sample frames. Supported range is [100, 400] ms.
+ @param format
+ If non-nil, attempts to apply this as the format of the specified output bus. This should
+ only be done when attaching to an output bus which is not connected to another node; an
+ error will result otherwise.
+ The tap and connection formats (if non-nil) on the specified bus should be identical.
+ Otherwise, the latter operation will override any previously set format.
+ @param outError
+ on exit, if an error occurs, a description of the error.
+ @param tapBlock
+ a block to be called with audio buffers.
+ @return
+ YES for success.
+
+ @discussion
+ Only one tap may be installed on any bus. Taps may be safely installed and removed while
+ the engine is running.
+
+ Note that if you have a tap installed on AVAudioOutputNode, there could be a mismatch
+ between the tap buffer format and AVAudioOutputNode's output format, depending on the
+ underlying physical device. Hence, instead of tapping the AVAudioOutputNode, it is
+ advised to tap the node connected to it.
+
+ E.g. to capture audio from input node:
+
+AVAudioEngine *engine = [[AVAudioEngine alloc] init];
+AVAudioInputNode *input = [engine inputNode];
+AVAudioFormat *format = [input outputFormatForBus: 0];
+NSError *error = nil;
+BOOL success = [input installTapOnBus: 0 bufferSize: 8192 format: format error:&error block: ^(AVAudioPCMBuffer *buf, AVAudioTime *when) {
+// ‘buf' contains audio captured from input node at time 'when'
+}];
+....
+// start engine
+
+*/
+- (BOOL)installTapOnBus:(AVAudioNodeBus)bus bufferSize:(AVAudioFrameCount)bufferSize format:(AVAudioFormat * __nullable)format error:(NSError **)outError block:(AVAudioNodeTapBlock)tapBlock NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(27.0), ios(27.0), watchos(27.0), tvos(27.0));
+
/*! @method removeTapOnBus:
@abstract Destroy a tap.
@param bus
the node output bus whose tap is to be destroyed
*/
+
- (void)removeTapOnBus:(AVAudioNodeBus)bus;
/*! @property engine
@@ -158,7 +202,7 @@
directly on the audio unit. These include changing initialization state, stream formats,
channel layouts or connections to other audio units.
*/
-@property (nonatomic, readonly) AUAudioUnit *AUAudioUnit API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
+@property (nonatomic, readonly) AUAudioUnit *AUAudioUnit API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0)) NS_REFINED_FOR_SWIFT;
#endif // AVAUDIONODE_HAVE_AUAUDIOUNIT
/*! @property latency
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioPlayer.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioPlayer.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioPlayer.h 2026-04-18 19:21:10
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioPlayer.h 2026-05-22 08:25:34
@@ -123,7 +123,7 @@
@end
/* A protocol for delegates of AVAudioPlayer */
-__WATCHOS_AVAILABLE(3_0)
+NS_SWIFT_UI_ACTOR
@protocol AVAudioPlayerDelegate