-
Notifications
You must be signed in to change notification settings - Fork 542
PHASE iOS xcode26.0 b1
Alex Soto edited this page Jun 9, 2025
·
1 revision
#PHASE.framework
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEngine.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEngine.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEngine.h 2025-04-19 02:38:43
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEngine.h 2025-05-23 06:49:33
@@ -41,6 +41,18 @@
- (instancetype)initWithUpdateMode:(PHASEUpdateMode)updateMode NS_DESIGNATED_INITIALIZER;
/*!
+ @method initWithUpdateMode:
+ @abstract Initialize a new engine with an update mode.
+ @param updateMode
+ Defines how the engine will be updated.
+ @param renderingMode
+ Defines where the engine applies rendering. See PHASERenderingMode for more info.
+*/
+- (instancetype)initWithUpdateMode:(PHASEUpdateMode)updateMode
+ renderingMode:(PHASERenderingMode)renderingMode NS_DESIGNATED_INITIALIZER
+API_AVAILABLE(visionos(26.0)) API_UNAVAILABLE(macos, ios, tvos) API_UNAVAILABLE( watchos);
+
+/*!
@method startAndReturnError:
@abstract Start or resume the engine.
@return
@@ -170,6 +182,14 @@
@discussion Returns nil if there are no active group presets in the engine. Activate or Deactivate the preset via [PHASEGroupPreset activate] and [PHASEGroupPreset deactivate]
*/
@property(nonatomic, readonly, strong, nullable) PHASEGroupPreset* activeGroupPreset;
+
+/*! @property lastRenderTime
+ @abstract Obtain the time for which the engine most recently rendered.
+ @discussion
+ Will return nil if the engine is not running
+*/
+@property (nonatomic, readonly, nullable) AVAudioTime* lastRenderTime
+API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0)) API_UNAVAILABLE( watchos);
@end // PHASEEngine
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEListener.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEListener.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEListener.h 2025-04-19 05:10:37
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEListener.h 2025-05-23 06:49:33
@@ -45,7 +45,7 @@
@abstract A combination of flags to express automatic headtracking behaviors for this listener.
*/
@property(nonatomic, assign) PHASEAutomaticHeadTrackingFlags automaticHeadTrackingFlags
-API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0)) API_UNAVAILABLE( watchos, visionos);
+API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), visionos(26.0)) API_UNAVAILABLE( watchos);
@end
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEvent.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEvent.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEvent.h 2025-04-19 04:40:43
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEvent.h 2025-05-23 06:25:26
@@ -93,6 +93,26 @@
- (void)startWithCompletion:(void (^_Nullable)(PHASESoundEventStartHandlerReason reason))handler;
/*!
+ @method startAtTime:completion
+ @abstract Start the sound event
+ @param when
+ The desired start time based on the engine time retrieved from [PHASEEngine lastRenderTime]
+ If the sound event starts immediately with an audible sound, it will begin rendering at this time. The sound event will otherwise begin operating at this time.
+ A nil value will start the sound event immediately
+ This time is not scaled by unitsPerSecond.
+ @param handler
+ The block that will be called when the sound event has stopped.
+ @discussion
+ This function notifies the engine to start the sound event, then returns immediately.
+ Once the sound event is playing (or has failed to start), you will receive a callback via the completion.
+ Playback will begin at the requested time if the sound event has finished preparing in time.
+ You may wait for preparation to finish with the [PHASESoundEvent prepare:completion] method before calling startAtTime, to ensure that the sound event will start at the desired time.
+ However if the desired time is far enough into the future to allow for preparation to happen, you may skip calling prepare entirely and just call startAtTime.
+ */
+- (void)startAtTime:(nullable AVAudioTime*)when completion:(void (^_Nullable)(PHASESoundEventStartHandlerReason reason))handler
+API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0)) API_UNAVAILABLE( watchos);
+
+/*!
@method seekToTime:completion
@abstract Seeks all leaf nodes in a PHASESoundEvent to a specified time relative to the start of the sound event.
@discussion
@@ -108,6 +128,26 @@
NS_SWIFT_NAME(seek(to:completion:));
/*!
+ @method seekToTime:resumeAtEngineTime:completion
+ @abstract Seeks all leaf nodes in a PHASESoundEvent to the specified time, and automatically resumes playback at the specified engine time.
+ @param time The desired time position in seconds to seek the nodes to.
+ @param engineTime The engine time to resume playback.
+ @param handler The completion callback that will be called when seeking is complete.
+ @discussion
+ This is a low latency convenience method that allows for tight deadlines to be met. However if the seek fails the node state will not be changed. You should check the callback and handle the failure appropriately.
+ The time parameter will seek the nodes to the equivalent sample position based on the sample rate of the asset.
+ The engineTime parameter is the engine timestamp to resume rendering at, based off of [PHASEEngine lastRenderTime].
+ If any leaf nodes do not support seeking, those nodes will ignore this command.
+ Nodes that have finished playing or have stopped will not seek.
+ The time parameter is in seconds and will be scaled by unitsPerSecond.
+ The time in the AVAudioTime structure is not scaled by unitsPerSecond.
+ The engineTime parameter will use the sample time if valid, if not, then the host time if valid.
+*/
+- (void)seekToTime:(double)time resumeAtEngineTime:(AVAudioTime*)engineTime completion:(nullable void (^)(PHASESoundEventSeekHandlerReason reason))handler
+API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0)) API_UNAVAILABLE( watchos)
+NS_SWIFT_NAME(seek(to:resumeAt:completion:));
+
+/*!
@method pause
@abstract Pause the sound event.
*/
@@ -118,6 +158,18 @@
@abstract Resume the sound event.
*/
- (void)resume;
+
+/*!
+ @method resumeAtTime
+ @abstract Resume the sound event at a specific time
+ @param time The desired start time based on the engine time retrieved from [PHASEEngine lastRenderTime]
+ @discussion
+ A nil time parameter will resume immediately.
+ The device time is not scaled by UnitsPerSecond and is in seconds.
+ */
+- (void)resumeAtTime:(nullable AVAudioTime*)time
+API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0)) API_UNAVAILABLE( watchos)
+NS_SWIFT_NAME(resume(at:));
/*!
@method stopAndInvalidate
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASETypes.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASETypes.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASETypes.h 2025-04-19 05:10:37
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASETypes.h 2025-05-23 05:42:23
@@ -39,6 +39,26 @@
NS_SWIFT_NAME(PHASEEngine.UpdateMode);
/*!
+ @enum PHASERenderingMode
+ @abstract Rendering Mode for a PHASE Engine.
+ @constant PHASERenderingModeLocal
+ A local engine is connected to an audio device and renders audio in real-time in the application process.
+ In this mode the engine receives all its inputs from the client such as acoustic configuration.
+ Updating an engine configured with `PHASERenderingModeLocal` executes any pending API commands locally.
+ @constant PHASERenderingModeClient
+ A client engine is connected to an audio device and renders audio in real-time in a secure process.
+ In this mode the engine receives inputs from the client and renders in a server.
+ In supported platforms this allows the server to apply privacy sensitive effects such as room virtual acoustics, low latency head-tracking and personalized Spatial Audio.
+ Updating an engine configured with `PHASERenderingModeClient` syncs any pending API commands to the server for processing.
+ */
+typedef NS_ENUM(NSInteger, PHASERenderingMode) {
+ PHASERenderingModeLocal = 0,
+ PHASERenderingModeClient = 1,
+}
+NS_SWIFT_NAME(PHASEEngine.RenderingMode)
+API_AVAILABLE(visionos(26.0)) API_UNAVAILABLE(macos, ios, tvos) API_UNAVAILABLE( watchos);
+
+/*!
@enum PHASERenderingState
@abstract Rendering state for sound events.
@constant PHASERenderingStateStopped
@@ -326,10 +346,13 @@
@abstract Automatic Head-Tracking flags.
@constant PHASEAutomaticHeadTrackingFlagOrientation
On capable devices, listener orientation will be automatically rotated based on user's head-orientation.
+ @constant PHASEAutomaticHeadTrackingFlagPosition
+ On capable devices, listener position will be automatically set based on user's position.
*/
typedef NS_OPTIONS(NSUInteger, PHASEAutomaticHeadTrackingFlags) {
- PHASEAutomaticHeadTrackingFlagOrientation = 1UL << 0,
+ PHASEAutomaticHeadTrackingFlagOrientation = 1UL << 0,
+ PHASEAutomaticHeadTrackingFlagPosition = 1UL << 1,
}
-API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0)) API_UNAVAILABLE( watchos, visionos);
+API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), visionos(26.0)) API_UNAVAILABLE( watchos);
#endif /* PHASETypes_h */