-
Notifications
You must be signed in to change notification settings - Fork 549
AVFAudio iOS xcode26.2 b1
Alex Soto edited this page Nov 5, 2025
·
1 revision
#AVFAudio.framework
diff -ruN /Applications/Xcode_26.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h /Applications/Xcode_26.2.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h
--- /Applications/Xcode_26.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h 2025-10-11 00:46:22
+++ /Applications/Xcode_26.2.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h 2025-10-29 23:57:56
@@ -188,8 +188,10 @@
The Voice Processor solution is tuned for voice signals, unlike this option, which is tuned for better capture
of wider range of audio signals in the presence of built-in speaker echo.
-This option is valid only when used with AVAudioSessionCategoryPlayAndRecord and AVAudioSessionModeDefault and is only available
-on certain 2024 or later iPhone models. Support can be queried using property `isEchoCancelledInputAvailable`.
+This option is only available on certain 2024 or later iPhone models and is valid only when used with the following configurations:
+ - AVAudioSessionCategoryPlayAndRecord and AVAudioSessionModeDefault
+ - AVAudioSessionCategoryMultiRoute and AVAudioSessionModeDualRoute
+Support can be queried using property `isEchoCancelledInputAvailable`.
Other recording sessions might be interrupted if this option is not compatible with sessions that are already recording.
After an audio session goes active, `isEchoCancelledInputEnabled` property can be queried to check if the option was honored.
@@ -202,8 +204,11 @@
/// Please see `prefersEchoCancelledInput` above for more details.
@property (readonly, nonatomic) BOOL isEchoCancelledInputEnabled API_AVAILABLE(ios(18.2)) API_UNAVAILABLE(tvos, watchos, macos, visionos);
+/// This property will return YES if the device supports echo cancellation with the following category and mode combinations:
+/// - ``AVAudioSessionCategoryPlayAndRecord`` with ``AVAudioSessionModeDefault``
+/// - ``AVAudioSessionCategoryMultiRoute`` with ``AVAudioSessionModeDualRoute``
+///
/// Query whether built-in mic / built-in speaker route supports echo cancellation for the session's given category and mode.
-/// Returns YES if device model supports echo cancellation and the audio category is PlayAndRecord and the mode is Default.
@property(readonly, nonatomic) BOOL isEchoCancelledInputAvailable API_AVAILABLE(ios(18.2)) API_UNAVAILABLE(watchos, tvos) API_UNAVAILABLE(macos);
/// Sets a Boolean value to inform the system to mute the session's output audio. The default value is false (unmuted).
diff -ruN /Applications/Xcode_26.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionTypes.h /Applications/Xcode_26.2.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionTypes.h
--- /Applications/Xcode_26.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionTypes.h 2025-10-11 00:15:15
+++ /Applications/Xcode_26.2.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionTypes.h 2025-10-27 23:36:46
@@ -197,6 +197,20 @@
/// - if the session is output muted, system may prevent interrupting other active audio apps.
OS_EXPORT AVAudioSessionMode const AVAudioSessionModeShortFormVideo API_AVAILABLE(ios(26.0)) API_UNAVAILABLE(watchos, tvos, visionos, macos);
+/// Appropriate for applications that require simultaneous use of built-in microphone/speaker
+/// with a secondary audio device that supports both input and output capabilities.
+///
+/// Only valid with ``AVAudioSessionCategoryMultiRoute``.
+///
+/// This mode requires ``AVAudioSessionCategoryOptionAllowBluetoothHFP`` to be set
+///
+/// When this mode is set:
+/// - The audio route will always include built-in mic/speaker as the primary route
+/// - Supported secondary route types: ``AVAudioSessionPortHeadsetMic``, ``AVAudioSessionPortHeadphones``, ``AVAudioSessionPortBluetoothLE``, ``AVAudioSessionPortBluetoothHFP``
+/// - Only routes with both input/output capabilities will be supported
+/// - Hardware volume controls will adjust volume for both primary and secondary routes
+/// - System may engage appropriate signal processing for output routes
+OS_EXPORT AVAudioSessionMode const AVAudioSessionModeDualRoute API_AVAILABLE(ios(26.2)) API_UNAVAILABLE(watchos, tvos, visionos, macos);
#pragma mark-- Names for NSNotifications --
@@ -416,7 +430,8 @@
/// Controls whether other active audio apps will be interrupted or mixed with when your app's
/// audio session goes active. Details depend on the category.
///
- /// - ``AVAudioSessionCategoryPlayAndRecord`` or ``AVAudioSessionCategoryMultiRoute``:
+ /// - ``AVAudioSessionCategoryPlayAndRecord`` or
+ /// ``AVAudioSessionCategoryMultiRoute`` with ``AVAudioSessionModeDefault``:
/// MixWithOthers defaults to false, but can be set to true, allowing other applications to
/// play in the background while your app has both audio input and output enabled.
///
@@ -429,7 +444,8 @@
/// MixWithOthers defaults to false and cannot be changed.
///
/// MixWithOthers is only valid with ``AVAudioSessionCategoryPlayAndRecord``,
- /// ``AVAudioSessionCategoryPlayback``, and ``AVAudioSessionCategoryMultiRoute``.
+ /// ``AVAudioSessionCategoryPlayback``, and
+ /// ``AVAudioSessionCategoryMultiRoute`` with ``AVAudioSessionModeDefault``.
AVAudioSessionCategoryOptionMixWithOthers = 0x1,
/// Controls whether or not other active audio apps will be ducked when when your app's audio
@@ -446,7 +462,7 @@
///
/// DuckOthers is only valid with ``AVAudioSessionCategoryAmbient``,
/// ``AVAudioSessionCategoryPlayAndRecord``, ``AVAudioSessionCategoryPlayback``, and
- /// ``AVAudioSessionCategoryMultiRoute``.
+ /// ``AVAudioSessionCategoryMultiRoute`` with ``AVAudioSessionModeDefault``.
AVAudioSessionCategoryOptionDuckOthers = 0x2,
/// Deprecated - please see ``AVAudioSessionCategoryOptionAllowBluetoothHFP``
@@ -495,7 +511,8 @@
/// goes active, also set ``AVAudioSessionCategoryOptionDuckOthers``.
///
/// Only valid with ``AVAudioSessionCategoryPlayAndRecord``,
- /// ``AVAudioSessionCategoryPlayback``, and ``AVAudioSessionCategoryMultiRoute``.
+ /// ``AVAudioSessionCategoryPlayback``, and
+ /// ``AVAudioSessionCategoryMultiRoute`` with ``AVAudioSessionModeDefault``.
AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers API_AVAILABLE(ios(9.0), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos) = 0x11,
/// Allows an application to change the default behavior of some audio session categories with
@@ -546,6 +563,20 @@
/// - Note This option has no relation to the recordPermission property, which indicates whether or
/// not the user has granted permission to use microphone input.
AVAudioSessionCategoryOptionOverrideMutedMicrophoneInterruption API_AVAILABLE(ios(14.5), watchos(7.3)) API_UNAVAILABLE(tvos, macos) = 0x80,
+
+ /// This option should be used if a session prefers to use FarFieldInput when available.
+ /// This option is only valid with categories that support input -
+ /// ``AVAudioSessionCategoryPlayAndRecord`` and ``AVAudioSessionCategoryRecord``.
+ ///
+ /// - This option requires ``AVAudioSessionCategoryOptionAllowBluetoothHFP`` to be set.
+ /// Otherwise error will be returned.
+ ///
+ /// - Support for this can be queried on input ports via the BluetoothMicrophone interface on a port,
+ /// via its member `farFieldCapture.isSupported`.
+ ///
+ /// - Active sessions can see if far-field input is enabled on a bluetooth audio device by querying
+ /// the BluetoothMicrophone interface of the input port of the current route for: `farFieldCapture.isEnabled`.
+ AVAudioSessionCategoryOptionFarFieldInput API_AVAILABLE(ios(26.2)) API_UNAVAILABLE(watchos, tvos, macos, visionos) = 1 << 18,
/// When this option is specified with a category that supports both input and output, the session
/// will enable full-bandwidth audio in both input & output directions, if the Bluetooth route supports