-
Notifications
You must be signed in to change notification settings - Fork 518
PHASE iOS xcode13.0 beta2
Manuel de la Pena edited this page Jul 12, 2021
·
2 revisions
#PHASE.framework https://github.com/xamarin/xamarin-macios/pull/12098
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASE.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASE.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASE.h 2021-06-01 21:11:08.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASE.h 2021-06-16 03:22:48.000000000 -0400
@@ -27,3 +27,4 @@
#import <PHASE/PHASESource.h>
#import <PHASE/PHASESpatialPipeline.h>
#import <PHASE/PHASETypes.h>
+#import <PHASE/PHASEGeneratorParameters.h>
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEAssetRegistry.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEAssetRegistry.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEAssetRegistry.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEAssetRegistry.h 2021-06-17 14:34:30.000000000 -0400
@@ -9,7 +9,7 @@
#define PHASEAssetRegistry_h
#import <CoreAudioTypes/CoreAudioTypes.h>
-#import <AVFoundation/AVAudioFormat.h>
+#import <AVFAudio/AVAudioFormat.h>
#import <PHASE/PHASESoundEventNodes.h>
#import <PHASE/PHASETypes.h>
@@ -19,9 +19,10 @@
#pragma mark - PHASEAsset
-/****************************************************************************************************/
-/*! @interface PHASEAsset
- * @abstract A base object that represents a registered asset in the PHASEAssetRegistry
+/**************************************************************************************************/
+/*!
+ @interface PHASEAsset
+ @abstract An object that represents a registered asset in the asset registry.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEAsset : NSObject
@@ -29,8 +30,9 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @property identifier
- @abstract The identifier that describes this unqiue asset
+/*!
+ @property identifier
+ @abstract The identifier that uniquely represents this asset.
*/
@property(readonly) NSString* identifier;
@@ -39,8 +41,9 @@
#pragma mark - PHASESoundAsset
/****************************************************************************************************/
-/*! @interface PHASESoundAsset
- * @abstract An object that represents a registered sound asset in the PHASEAssetRegistry
+/*!
+ @interface PHASESoundAsset
+ @abstract An object that represents a registered sound asset in the asset registry.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASESoundAsset : PHASEAsset
@@ -48,18 +51,21 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @property url
- @abstract The URL of this asset, if applicable.
+/*!
+ @property url
+ @abstract The URL of the sound asset, if applicable.
*/
@property(readonly, nullable) NSURL* url;
-/*! @property data
- @abstract The buffer for this asset, if applicable.
+/*!
+ @property data
+ @abstract The buffer for the sound asset, if applicable.
*/
@property(readonly, nullable) NSData* data;
-/*! @property type
- @abstract The asset type.
+/*!
+ @property type
+ @abstract The sound asset type.
*/
@property(readonly) PHASEAssetType type;
@@ -68,8 +74,9 @@
#pragma mark - PHASESoundEventNodeAsset
/****************************************************************************************************/
-/*! @interface PHASESoundEventNodeAsset
- * @abstract An object that represents a registered tree of SoundEvent nodes in the PHASEAssetRegistry
+/*!
+ @interface PHASESoundEventNodeAsset
+ @abstract An object that represents a registered sound event asset in the asset registry.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASESoundEventNodeAsset : PHASEAsset
@@ -82,8 +89,9 @@
#pragma mark - PHASEGlobalMetaParameterAsset
/****************************************************************************************************/
-/*! @interface PHASEGlobalMetaParameterAsset
- * @abstract An object that represents a registered global metaparameter asset in the PHASEAssetRegistry
+/*!
+ @interface PHASEGlobalMetaParameterAsset
+ @abstract An object that represents a registered global metaparameter asset in the asset registry.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEGlobalMetaParameterAsset : PHASEAsset
@@ -96,8 +104,9 @@
#pragma mark - PHASEAssetRegistry
/****************************************************************************************************/
-/*! @class PHASEAssetRegistry
- @abstract A Registry for assets
+/*!
+ @interface PHASEAssetRegistry
+ @abstract Asset registry
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEAssetRegistry : NSObject
@@ -105,25 +114,28 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method registerGlobalMetaParameter:error
- @abstract Loads and registers a Data Bundle from a JSON file at a given URL
+/*!
+ @method registerGlobalMetaParameter:error
+ @abstract Register a global metaparameter with the asset registry.
@param metaParameterDefinition
- The PHASEMetaParameterDefinition object to register
+ The metaparameter object to register.
@param error
- The error object in case of an error
+ The error object in case of an error.
@return
- A PHASEGlobalMetaParameterAsset object
+ A PHASEGlobalMetaParameterAsset object.
*/
- (nullable PHASEGlobalMetaParameterAsset*)registerGlobalMetaParameter:(PHASEMetaParameterDefinition*)metaParameterDefinition
- error:(NSError**)error;
+ error:(NSError**)error
+NS_SWIFT_NAME(registerGlobalMetaParameter(metaParameterDefinition:));
-/*! @method registerSoundEventAssetWithRootNode:identifier:error
- @abstract Registers a sound event node tree with the registry for quick and efficient recall for repeated playback
+/*!
+ @method registerSoundEventAssetWithRootNode:identifier:error
+ @abstract Register a sound event asset with the asset registry.
@param rootNode
- The PHASESoundEventNodeDefinition root node of a tree to register
+ The root node of the sound event asset to register.
@param identifier
- Optional. The identifier to assign to this object. Nil generates an automatic identifier.
+ The identifier to assign to this object. Nil generates an automatic identifier.
@param error
The error object in case of an error
@return
@@ -134,19 +146,24 @@
error:(NSError**)error
NS_SWIFT_NAME(registerSoundEventAsset(rootNode:identifier:));
-/*! @method registerSoundAssetAtURL:identifier:assetType:channelLayout:normalizationMode:error
- @abstract Registers a sound file as an asset in the system.
+/*!
+ @method registerSoundAssetAtURL:identifier:assetType:channelLayout:normalizationMode:error
+ @abstract Register an audio file as a sound asset in the system.
+ @note
+ This function is synchronous and thread-safe.
+ While it could potentially take some time to preprocess the asset into the runtime format,
+ you can run this function for multiple assets in multiple threads to speed up the loading process.
@param url
- The URL of this asset file.
+ The URL of the audio file.
@param identifier
- The identifier to assign to this asset. Nil generates an automatic identifier.
+ The identifier to assign to this sound asset. Nil generates an automatic identifier.
@param assetType
- The PHASEAssetType for this asset.
+ The asset type for this sound asset.
@param channelLayout
- The audio channel layout for this asset.
+ The audio channel layout for this sound asset.
If a valid channel layout definition is read from the file being registered, this will override it.
- If nil is passed as a value for this property, the file must either be mono or stereo, or already contain a vaild channel layout
- definition. This channel layout must have the same channel count as the file being loaded.
+ If nil is passed as a value for this property, the file must either be mono or stereo, or already contain a vaild channel layout definition.
+ This channel layout must have the same channel count as the audio file being loaded.
@param normalizationMode
The normalization mode.
@param error
@@ -162,13 +179,18 @@
error:(NSError**)error
NS_SWIFT_NAME(registerSoundAsset(url:identifier:assetType:channelLayout:normalizationMode:));
-/*! @method registerSoundAssetWithData:identifier:format:normalizationMode:error
- @abstract Registers a data buffer as an asset in the system.
+/*!
+ @method registerSoundAssetWithData:identifier:format:normalizationMode:error
+ @abstract Register audio data as a sound asset in the system.
+ @note
+ This function is synchronous and thread-safe.
+ While it could potentially take some time to preprocess the asset into the runtime format,
+ you can run this function for multiple assets in multiple threads to speed up the loading process.
@param data
- A buffer containing the audio data to register as an asset. Audio data must either bea single interleaved PCM buffer or
- de-interleaved PCM buffers packed back to back.
+ A buffer containing the audio data to register as a sound asset.
+ Audio data must either be a single channel-interleaved PCM buffer or per-channel de-interleaved PCM buffers packed back to back.
@param identifier
- The PHASEUID to assign to this asset. Nil generates an automatic identifier.
+ The identifier to assign to this sound asset. Nil generates an automatic identifier.
@param format
The AVAudioFormat object that describes the audio data in the buffer.
@param normalizationMode
@@ -186,27 +208,30 @@
NS_SWIFT_NAME(registerSoundAsset(data:identifier:format:normalizationMode:));
-/*! @method unregisterAssetWithIdentifier
- @abstract Unregisters and unloads an asset if applicable
+/*!
+ @method unregisterAssetWithIdentifier
+ @abstract Unregister and unload an asset.
@param identifier
The identifier of the PHASEAsset object to unregister
- @param completionHandler
- An optional completion handler that will be called when the asset has been deregistered and it is safe to deallocate external
- resources, if there are any
-*/
-- (void)unregisterAssetWithIdentifier:(NSString*)identifier completionHandler:(nullable void (^)(PHASEAssetUnregisterHandlerReason reason, NSError* error))completionHandler
-NS_SWIFT_NAME(unregisterAsset(identifier:completionHandler:));
-
-/*! @method assetForIdentifier
- @abstract Looks up and returns a PHASEAsset object if found in the registry
+ @param completionBlock
+ An optional completion block that will be called when the asset has been unregistered.
+ Once you receive this callback, it's safe to deallocate external resources, if applicable.
+*/
+- (void)unregisterAssetWithIdentifier:(NSString*)identifier completionBlock:(nullable void (^)(bool success))completionBlock
+NS_SWIFT_NAME(unregisterAsset(identifier:completionBlock:));
+
+/*!
+ @method assetForIdentifier
+ @abstract Finds an asset in the asset registry, given an identifier.
@param identifier
The identifier of this asset
@return
- A PHASEAsset object
+ A PHASEAsset object, or nil if one could not be found.
*/
- (nullable PHASEAsset*)assetForIdentifier:(NSString*)identifier;
-/*! @property globalMetaParameters
+/*!
+ @property globalMetaParameters
@abstract A dictionary of global metaparameters
*/
@property(atomic, readonly, copy) NSDictionary<NSString*, PHASEMetaParameter*>* globalMetaParameters;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDefinition.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDefinition.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDefinition.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDefinition.h 2021-06-22 17:37:47.000000000 -0400
@@ -13,8 +13,11 @@
NS_ASSUME_NONNULL_BEGIN
/****************************************************************************************************/
-/*! @interface PHASEDefinition
- * @abstract A base object that represents a definition object for building playable object in PHASE
+/*!
+ @interface PHASEDefinition
+ @abstract The base class for a definition.
+ @discussion
+ Contains an identifer that uniquely represents this definition.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEDefinition : NSObject
@@ -22,6 +25,10 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
+/*!
+ @property identifier
+ @abstract The identifier that uniquely represents this definition.
+*/
@property(readonly, nonatomic) NSString* identifier;
@end
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDirectivityModel.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDirectivityModel.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDirectivityModel.h 2021-06-02 12:45:09.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDirectivityModel.h 2021-06-17 03:44:27.000000000 -0400
@@ -15,29 +15,36 @@
#pragma mark - PHASECardioidDirectivityModelSubbandParameters
/****************************************************************************************************/
-/*! @interface PHASECardioidDirectivityModelSubbandParameters
- * @abstract Cardioid directivity model subband parameters.
+/*!
+ @interface PHASECardioidDirectivityModelSubbandParameters
+ @abstract Cardioid directivity model subband parameters.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASECardioidDirectivityModelSubbandParameters : NSObject
- (instancetype)init;
-/*! @property frequency
- @abstract The frequency, in hertz.
- @note Values are clamped to the range [20.0, 20000.0]. Default value is 1000.0.
+/*!
+ @property frequency
+ @abstract The frequency of the subband, in hertz.
+ @note
+ Values are clamped to the range [20.0, 20000.0]. Default value is 1000.0.
*/
@property(nonatomic) double frequency;
-/*! @property pattern
+/*!
+ @property pattern
@abstract The directivity pattern.
- @note Values are clamped to the range [0.0, 1.0]. Default value is 0.0. 0.0 is omnidirectional. 0.5 is cardioid. 1.0 is dipole.
+ @note
+ Values are clamped to the range [0.0, 1.0]. Default value is 0.0. 0.0 is omnidirectional. 0.5 is cardioid. 1.0 is dipole.
*/
@property(nonatomic) double pattern;
-/*! @property sharpness
+/*!
+ @property sharpness
@abstract The sharpness of the directivity pattern.
- @note Values are clamped to the range [1.0, DBL_MAX]. Default value is 1.0. Values > 1.0 increase sharpness.
+ @note
+ Values are clamped to the range [1.0, DBL_MAX]. Default value is 1.0. Values > 1.0 increase sharpness.
*/
@property(nonatomic) double sharpness;
@@ -46,45 +53,56 @@
#pragma mark - PHASEConeDirectivityModelSubbandParameters
/****************************************************************************************************/
-/*! @interface PHASEConeDirectivityModelSubbandParameters
- * @abstract Cone directivity model subband parameters.
+/*!
+ @interface PHASEConeDirectivityModelSubbandParameters
+ @abstract Cone directivity model subband parameters.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEConeDirectivityModelSubbandParameters : NSObject
- (instancetype)init;
-/*! @method setInnerAngle:outerAngle
+/*!
+ @method setInnerAngle:outerAngle
@abstract Set the innerAngle and outerAngle of the Cone Directivity Model Subband
@param innerAngle
The inner angle of the cone directivity model, must be less than or equal to outer angle.
@param outerAngle
The outer angle of the cone directivity model, must be greater than or equal to inner angle.
- @note Default value for each angle is 360.0. outerAngle must be >= innerAngle
+ @note The default value for each angle is 360.0. outerAngle must be >= innerAngle.
*/
-- (void)setInnerAngle:(double)innerAngle outerAngle:(double)outerAngle;
+- (void)setInnerAngle:(double)innerAngle outerAngle:(double)outerAngle
+NS_SWIFT_NAME(setAngles(innerAngle:outerAngle:));
-/*! @property frequency
- @abstract The frequency, in hertz.
- @note Default value is 1000.0.
+/*!
+ @property frequency
+ @abstract The frequency of the subband, in hertz.
+ @note
+ Default value is 1000.0.
*/
@property(nonatomic) double frequency;
-/*! @property innerAngle
+/*!
+ @property innerAngle
@abstract The inner angle, in degrees.
- @note Default value is 360.0.
+ @note
+ Default value is 360.0.
*/
@property(readonly) double innerAngle;
-/*! @property outerAngle
+/*!
+ @property outerAngle
@abstract The outer angle, in degrees.
- @note Default value is 360.0.
+ @note
+ Default value is 360.0.
*/
@property(readonly) double outerAngle;
-/*! @property outerGain
+/*!
+ @property outerGain
@abstract The outer gain.
- @note Values are clamped to the range [0.0, 1.0]. Default value is 1.0.
+ @note
+ Values are clamped to the range [0.0, 1.0]. Default value is 1.0.
*/
@property(nonatomic) double outerGain;
@@ -93,50 +111,58 @@
#pragma mark - PHASEDirectivityModelParameters
/****************************************************************************************************/
-/*! @class PHASEDirectivityModelParameters
+/*!
+ @interface PHASEDirectivityModelParameters
@abstract Directivity model parameters.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEDirectivityModelParameters : NSObject
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)new NS_UNAVAILABLE;
-
@end
#pragma mark - PHASECardioidDirectivityModelParameters
/****************************************************************************************************/
-/*! @class PHASECardioidDirectivityModelParameters
+/*!
+ @interface PHASECardioidDirectivityModelParameters
@abstract Cardioid directivity model parameters.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASECardioidDirectivityModelParameters : PHASEDirectivityModelParameters
-- (instancetype)init;
+- (instancetype)init
+API_DEPRECATED_WITH_REPLACEMENT("-initWithSubbandParameters:", macos(10.16, 11.0), ios(14.0, 14.0));
+
+@property(nonatomic, strong, readonly) NSMutableArray<PHASECardioidDirectivityModelSubbandParameters*>* subbands
+API_DEPRECATED_WITH_REPLACEMENT("-initWithSubbandParameters:", macos(10.16, 11.0), ios(14.0, 14.0));
-/*! @property subbands
- @abstract A mutable array of PHASECardioidDirectivityModelSubbandParameters.
+- (instancetype)initWithSubbandParameters: (NSArray<PHASECardioidDirectivityModelSubbandParameters*>*) subbandParameters;
+
+/*!
+ @property subbandParameters
+ @abstract An array of subband parameters.
*/
-@property(nonatomic, strong, readonly) NSMutableArray<PHASECardioidDirectivityModelSubbandParameters*>* subbands;
+@property(nonatomic, strong, readonly) NSArray<PHASECardioidDirectivityModelSubbandParameters*>* subbandParameters;
@end
#pragma mark - PHASEConeDirectivityModelParameters
/****************************************************************************************************/
-/*! @class PHASEConeDirectivityModelParameters
+/*!
+ @interface PHASEConeDirectivityModelParameters
@abstract Cone directivity model parameters.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEConeDirectivityModelParameters : PHASEDirectivityModelParameters
-- (instancetype)init;
+- (instancetype)initWithSubbandParameters: (NSArray<PHASEConeDirectivityModelSubbandParameters*>*) subbandParameters;
-/*! @property subbands
- @abstract A mutable array of PHASEConeDirectivityModelSubbandParameters.
+/*!
+ @property subbandParameters
+ @abstract An array of subband parameters.
*/
-@property(nonatomic, strong, readonly) NSMutableArray<PHASEConeDirectivityModelSubbandParameters*>* subbands;
+@property(nonatomic, strong, readonly) NSArray<PHASEConeDirectivityModelSubbandParameters*>* subbandParameters;
@end
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDistanceModel.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDistanceModel.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDistanceModel.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDistanceModel.h 2021-06-22 17:34:47.000000000 -0400
@@ -14,46 +14,53 @@
NS_ASSUME_NONNULL_BEGIN
/****************************************************************************************************/
-/*! @class PHASEDistanceModelFadeOutParameters
+/*!
+ @interface PHASEDistanceModelFadeOutParameters
@abstract Distance model fade out parameters.
*/
-OS_EXPORT API_AVAILABLE(macos(10.15), ios(14.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEDistanceModelFadeOutParameters : NSObject
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithCullDistance
- @abstract Initialize a PHASEDistanceModelFadeOutParameters with a cullDistance.
+/*!
+ @method initWithCullDistance
+ @abstract Initialize with a cullDistance.
@param cullDistance
The distance beyond which the sound will be culled. Values must be >= 1.
@note
The cullDistance is scaled by unitsPerMeter internally, so can be provided at the client's native spatial scale.
The system will smoothly fade the sound to zero before reaching this distance to avoid any audible artifacts.
@return
- self
+ An instance, or nil if initialization fails.
*/
- (instancetype)initWithCullDistance:(double)cullDistance NS_DESIGNATED_INITIALIZER;
-/*! @property cullDistance
- @abstract The distance (scaled by unitsPerMeter) between the source and listener for a sound to be heard. Sounds outside this distance will be culled.
- @note Values are clamped the range [0, DBL_MAX].
+/*!
+ @property cullDistance
+ @abstract The distance beyond which the sound will be culled.
+ @note
+ Values are clamped the range [1, DBL_MAX].
+ This value is scaled by unitsPerMeter internally, so can be provided at the client's native spatial scale.
*/
@property(nonatomic,readonly) double cullDistance;
@end
/****************************************************************************************************/
-/*! @class PHASEDistanceModelParameters
+/*!
+ @interface PHASEDistanceModelParameters
@abstract Distance model parameters.
*/
-OS_EXPORT API_AVAILABLE(macos(10.15), ios(14.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEDistanceModelParameters : NSObject
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @property fadeOutParameters
+/*!
+ @property fadeOutParameters
@abstract Fade out parameters (optional).
*/
@property(nullable, nonatomic, strong) PHASEDistanceModelFadeOutParameters* fadeOutParameters;
@@ -61,47 +68,57 @@
@end
/****************************************************************************************************/
-/*! @class PHASEGeometricSpreadingDistanceModelParameters
+/*!
+ @interface PHASEGeometricSpreadingDistanceModelParameters
@abstract Geometric spreading distance model parameters.
- @discussion Standard geometric spreading loss as a function of geometry and distance.
+ @discussion
+ Standard geometric spreading loss as a function of geometry and distance.
*/
-OS_EXPORT API_AVAILABLE(macos(10.15), ios(14.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEGeometricSpreadingDistanceModelParameters : PHASEDistanceModelParameters
- (instancetype)init;
-/*! @property rolloffFactor
- @abstract The rolloff factor.
- @note Values are clamped to the range [0.0, DBL_MAX]. Default value is 1.0. 0.0 is no effect. 0.5 is half the effect. 1.0 is normal. 2.0
- is double the effect.
+/*!
+ @property rolloffFactor
+ @abstract Rolloff factor.
+ @note
+ Values are clamped to the range [0.0, DBL_MAX].
+ Default value is 1.0.
+ 0.0 is no effect. 0.5 is half the effect. 1.0 is normal. 2.0 is double the effect.
*/
@property(nonatomic) double rolloffFactor;
@end
/****************************************************************************************************/
-/*! @class PHASEEnvelopeDistanceModelParameters
+/*!
+ @class PHASEEnvelopeDistanceModelParameters
@abstract Envelope distance model parameters.
- @discussion Envelope-driven attenuation over distance.
+ @discussion
+ Envelope-driven attenuation over distance.
*/
-OS_EXPORT API_AVAILABLE(macos(10.15), ios(14.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEEnvelopeDistanceModelParameters : PHASEDistanceModelParameters
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithEnvelope
+/*!
+ @method initWithEnvelope
@abstract Initialize a PHASEEnvelopeDistanceModelParameters with a PHASEEnvelope
@param envelope
- An envelope object where x points are interpreted as distance and y points interpreted as gain.
+ An envelope object where x values are interpreted as distance and the y values interpreted as gain.
@return
- self
+ An instance, or nil if initialization failed.
*/
- (instancetype)initWithEnvelope:(PHASEEnvelope*)envelope NS_DESIGNATED_INITIALIZER;
-/*! @property envelope
+/*!
+ @property envelope
@abstract A PHASEEnvelope object
- @note X parameter of the Envelope is interpreted as distance, while Y parameter is interpreted as gain
+ @note
+ The x values are interpreted as distance and the y values are interpreted as gain.
*/
@property(nonatomic, strong, readonly) PHASEEnvelope* envelope;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDucker.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDucker.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDucker.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEDucker.h 2021-06-17 14:34:30.000000000 -0400
@@ -14,9 +14,9 @@
NS_ASSUME_NONNULL_BEGIN
/****************************************************************************************************/
-/*! @class PHASEDucker
+/*!
+ @interface PHASEDucker
@abstract A PHASEDucker is used to describe the ducking behavior across different groups.
- @discussion ..
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEDucker : NSObject
@@ -24,31 +24,32 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithSourceGroups:targetGroups:attenuation:attackTime:releaseTime:
- @abstract
+/*!
+ @method initWithSourceGroups:targetGroups:attenuation:attackTime:releaseTime:
+ @discussion
Whenever a sound from any source group plays, all the sounds in the target groups will be
ducked by the given gain using the given attack and release times.
+ @note
+ The ducker is initialially inactive. You must call activate() to make it active.
+ The ducker must also be deactivated with a call to deactivate() before you can release it from memory.
@param engine
- The PHASEEngine object to register this ducker with.
+ The engine to register this ducker with.
@param sourceGroups
- The sounds determining the ducking behavior for target sounds.
+ Thesource groups that will trigger the ducker when a sound in one of the source groups starts playback.
@param targetGroups
- The sounds which will be ducked when a sound from any source group plays.
+ The target groups that will be ducked when a sound in one of the source groups triggers the ducker.
@param gain
The linear gain scalar amount to apply when the ducker is engaged. A value of 0 means full attenuation, and 1 is no attenuation. Values are clamped to the range [0, 1].
@param attackTime
- The time for the attenuation gain to ramp into effect. This value is scaled by unitsPerSecond internally, so can be provided at the
- client's native time scale.
+ The time for the attenuation gain to ramp into effect.
+ This value is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
@param releaseTime
- The time for the ducked sounds to ramp back to their original level. This value is scaled by unitsPerSecond internally, so can be
- provided at the client's native time scale.
+ The time for the ducked sounds to ramp back to their original level.
+ This value is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
@param attackCurve
- The curve function to use during the attack phase of gain reduction.
+ The type of curve function to use during the attack phase of gain reduction.
@param releaseCurve
- The curve function to use during the release phase of gain reduction.
- @discussion
- The ducker will be inactive after init, and must be activated via the "active" property.
- The ducker must also be deactivated with the property before it will be released from memory.
+ The type of curve function to use during the release phase of gain reduction.
*/
- (instancetype)initWithEngine:(PHASEEngine*)engine
sourceGroups:(NSSet<PHASEGroup*>*)sourceGroups
@@ -60,55 +61,77 @@
releaseCurve:(PHASECurveType)releaseCurve
NS_SWIFT_NAME(init(engine:sourceGroups:targetGroups:gain:attackTime:releaseTime:attackCurve:releaseCurve:));
+/*!
+ @method activate
+ @abstract Activates the ducker
+*/
+-(void)activate;
+
+/*!
+ @method deactivate
+ @abstract Deactivates the ducker
+*/
+-(void)deactivate;
-/*! @property sourceGroups
- @abstract The sounds determining the ducking behavior for target sounds.
+/*!
+ @method isActive
+ @abstract Returns YES if the ducker is active; otherwise, returns NO.
+*/
+-(BOOL)isActive;
+
+/*!
+ @property sourceGroups
+ @abstract The source groups that will trigger the ducker when a sound in one of the source groups starts playback.
*/
@property(nonatomic, readonly, copy) NSSet<PHASEGroup*>* sourceGroups;
-/*! @property targetGroups
- @abstract The sounds which will be ducked when a sound from any source group plays.
+/*!
+ @property targetGroups
+ @abstract The target groups that will be ducked when a sound in one of the source groups triggers the ducker.
*/
@property(nonatomic, readonly, copy) NSSet<PHASEGroup*>* targetGroups;
-/*! @property gain
+/*!
+ @property gain
@abstract Linear gain scalar.
- @note Values are clamped to the range [0, 1]. Default value is 1.
+ @note
+ Values are clamped to the range [0, 1]. Default value is 1.
*/
@property(nonatomic, readonly) double gain;
-/*! @property attackTime
+/*!
+ @property attackTime
@abstract The time for the attenuation gain to ramp into effect.
- @note The attack time is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
+ @note
+ The attack time is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
*/
@property(nonatomic, readonly) double attackTime;
/*! @property releaseTime
@abstract The time for the ducked sounds to ramp back to their original level.
- @note The release time is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
+ @note
+ The release time is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
*/
@property(nonatomic, readonly) double releaseTime;
-/*! @property attackCurve
- @abstract The unique identifier for this object
+/*!
+ @property attackCurve
+ @abstract The type of curve function to use during the attack phase of gain reduction.
*/
@property(nonatomic, readonly) PHASECurveType attackCurve;
-/*! @property releaseCurve
- @abstract The curve function to use during the attack phase of gain reduction.
+/*!
+ @property releaseCurve
+ @abstract The type of curve function to use during the release phase of gain reduction.
*/
@property(nonatomic, readonly) PHASECurveType releaseCurve;
-/*! @property identifier
- @abstract The identifier representing this ducker.
+/*!
+ @property identifier
+ @abstract The identifier that uniquely represents this ducker.
*/
@property(nonatomic, readonly) NSString* identifier;
-/*! @property active;
- @abstract Activates and deactivates the ducker
-*/
-@property(nonatomic, readwrite, getter=isActive) BOOL active;
-
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEngine.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEngine.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEngine.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEngine.h 2021-06-17 03:44:27.000000000 -0400
@@ -14,14 +14,15 @@
#import <PHASE/PHASEObject.h>
#import <PHASE/PHASESoundEvent.h>
#import <PHASE/PHASETypes.h>
-#import <AVFoundation/AVAudioFormat.h>
+#import <AVFAudio/AVAudioFormat.h>
NS_ASSUME_NONNULL_BEGIN
/****************************************************************************************************/
-/*! @class PHASEEngine
- @abstract A PHASEEngine spatializes sounds attached to sources for a listener in a global world.
+/*!
+ @interface PHASEEngine
+ @abstract PHASE engine instance.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEEngine : NSObject
@@ -29,117 +30,140 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithUpdateMode:
- @abstract Initialize a new engine.
+/*!
+ @method initWithUpdateMode:
+ @abstract Initialize a new engine with an update mode.
@param updateMode
- Defines how PHASE will be updated
+ Defines how the engine will be updated.
*/
- (instancetype)initWithUpdateMode:(PHASEUpdateMode)updateMode NS_DESIGNATED_INITIALIZER;
-/*! @method startAndReturnError:
+/*!
+ @method startAndReturnError:
@abstract Start or resume the engine.
@return
- YES for success
+ YES for success.
*/
- (BOOL)startAndReturnError:(NSError**)error;
-/*! @method pause
+/*!
+ @method pause
@abstract Pause the engine.
*/
- (void)pause;
-/*! @method stop
+/*!
+ @method stop
@abstract Stop the engine.
*/
- (void)stop;
-/*! @method update:
- @abstract Manually update PHASE's systems on the calling thread
+/*!
+ @method update:
+ @abstract Manually update the engine instance on the calling thread.
@discussion
This will kick off all of the API commands called since the last call to update,
- as well as update any systems and objects that need to be kept current.
+ update any systems and objects that need to be kept current, and call any registered handlers.
+ @note
+ This function has no effect if the engine's update mode is PHASEUpdateModeAutomatic.
*/
- (void)update;
-/*! @property overrideOutputSpatializationMode
- @abstract When set to a value other than PHASESpatializationModeAutomatic, overrides the default output spatializer and uses the
- specified one instead
+/*!
+ @property outputSpatializationMode
@discussion
- PHASE will enable Binaural, Channel-Based, or other spatializer modes based on active device and peripheral types.
- This will override this behavior and explicitly select a spatializer mode.
+ When set to a value other than PHASESpatializationModeAutomatic,
+ overrides the default output spatializer and uses the specified one instead.
*/
-@property(nonatomic, assign) PHASESpatializationMode overrideOutputSpatializationMode;
+@property(nonatomic, assign) PHASESpatializationMode outputSpatializationMode;
-/*! @property renderingState
- @abstract Engine's current rendering state
+/*!
+ @property renderingState
+ @abstract The engine's current rendering state.
*/
@property(nonatomic, readonly) PHASERenderingState renderingState;
-/*! @property rootObject
- @abstract The root object of the engine
- @discussion
- This object is created and owned by the engine.
+/*!
+ @property rootObject
+ @abstract The root object of the engine's scene graph.
+ @discussion
+ Attach objects to the engine's rootObject or one of its children to make them active within the engine's scene graph.
+ This will ensure they take part in the simulation.
+ @note
+ The rootObject is created and owned by the engine.
The rootObject may not be set as the child of another object. This will cause an error to be thrown.
- The transform of the rootObject may not be changed. This will cause an error to be thrown.
+ The rootObject's transform may not be changed. This will cause an error to be thrown.
The rootObject may not be copied. This will cause an error to be thrown.
*/
@property(nonatomic, readonly, strong) PHASEObject* rootObject;
-/*! @property defaultMedium
- @abstract The medium for all objects in the engine that are not within an enclosing environment.
+/*!
+ @property defaultMedium
+ @abstract The default medium in the engine.
+ @discussion
+ The default value is PHASEMediumPresetDefault.
*/
@property(nonatomic, strong) PHASEMedium* defaultMedium;
-/*! @property defaultReverbPreset
- @abstract The default reverb preset on the engine.
+/*!
+ @property defaultReverbPreset
+ @abstract The default reverb preset in the engine.
@discussion
- The reverb preset for all objects in the engine that are not within an enclosing environment.
- Default is PHASEReverbPresetNone.
+ The default value is PHASEReverbPresetNone.
*/
@property(nonatomic, assign) PHASEReverbPreset defaultReverbPreset;
-/*! @property unitsPerSecond
+/*!
+ @property unitsPerSecond
@abstract The number of units in a second.
@discussion
The unitsPerSecond is used internally to scale time/duration values passed to the API.
This allows clients to pass time/duration values in their own native time scale.
- @note Values are clamped to the range [0, inf]. Default value is 1.
+ @note
+ Values are clamped to the range (0, inf]. Default value is 1.
*/
@property(nonatomic, assign) double unitsPerSecond;
-/*! @property unitsPerMeter
+/*!
+ @property unitsPerMeter
@abstract The number of units in a meter.
@discussion
The unitsPerMeter is used internally to scale metric values passed to the API.
- This allows clients to pass metric values in their own native scale.
- @note Values are clamped to the range [0, inf]. Default value is 1.
+ This allows clients to pass metric values in their own native spatial scale.
+ @note
+ Values are clamped to the range (0, inf]. Default value is 1.
*/
@property(nonatomic, assign) double unitsPerMeter;
-/*! @property assetRegistry
+/*!
+ @property assetRegistry
@abstract A registry for assets available to the engine
*/
@property(nonatomic, readonly, strong) PHASEAssetRegistry* assetRegistry;
-/*! @property activeSoundEvents
+/*!
+ @property soundEvents
@abstract An array of the active sound event objects in the system
@discussion Returns a dictionary of the sound events at the time it is retrieved. This includes all sound events that are registered with the engine, including those that are preparing, playing, paused or stopping.
*/
@property(nonatomic, readonly, copy) NSArray<PHASESoundEvent*>* soundEvents;
-/*! @property groups
+/*!
+ @property groups
@abstract A dictionary of the groups in the system
@discussion Returns a dictionary of the groups at the time it is retrieved.
*/
-@property(readonly, copy) NSDictionary<NSString*, PHASEGroup*>* groups;
+@property(nonatomic, readonly, copy) NSDictionary<NSString*, PHASEGroup*>* groups;
-/*! @property duckers
+/*!
+ @property duckers
@abstract An array of the ducker objects in the system
@discussion Returns a dictionary of the ducker objects at the time it is retrieved.
*/
@property(nonatomic, readonly, copy) NSArray<PHASEDucker*>* duckers;
-/*! @property activeGroupPreset
+/*!
+ @property activeGroupPreset
@abstract The active group mixer preset in the system
@discussion Returns nil if there are no active group presets in the engine. Activate or Deactivate the preset via [PHASEGroupPreset activate] and [PHASEGroupPreset deactivate]
*/
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEnvelope.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEnvelope.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEnvelope.h 2021-06-02 12:48:06.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEEnvelope.h 2021-06-17 14:34:29.000000000 -0400
@@ -1,26 +1,61 @@
//
-// PHASEEnvelope_Internal.h
+// PHASEEnvelope.h
// PHASE
//
// Copyright © 2021 Apple Inc. All rights reserved.
//
-#ifndef PHASEEnvelope_Internal_h
-#define PHASEEnvelope_Internal_h
+#ifndef PHASEEnvelope_h
+#define PHASEEnvelope_h
#import <PHASE/PHASETypes.h>
#import <simd/types.h>
-typedef simd_double2 PHASEEnvelopePoint;
-typedef simd_double2 PHASEEnvelopeMinMax;
-
NS_ASSUME_NONNULL_BEGIN
+/****************************************************************************************************/
+/*!
+ @interface PHASENumericPair
+ @abstract A numeric pair.
+*/
+OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
+@interface PHASENumericPair : NSObject
+
+/*!
+ @method initWithFirstValue:secondValue
+ @abstract Initialize a numeric pair with a first and second value.
+ @param first
+ The first value in the pair.
+ @param second
+ The second value in the pair.
+ @return
+ A new pair.
+ */
+- (instancetype)initWithFirstValue:(double)first secondValue:(double)second;
+
+/*!
+ @property first
+ @abstract The first value in the numeric pair.
+ @discussion
+ The default value is 0.0.
+ */
+@property(nonatomic, assign) double first;
+
+/*! @property second
+ @abstract The second value in the numeric pair.
+ @discussion
+ The default value is 0.0.
+ */
+@property(nonatomic, assign) double second;
+
+@end
+
#pragma mark - PHASEEnvelopeSegment
/****************************************************************************************************/
-/*! @class PHASEEnvelopeSegment
+/*!
+ @class PHASEEnvelopeSegment
@abstract An envelope segment defined by an end point and a curve type.
@discussion
Envelope segments do 'not' contain a start point.
@@ -29,28 +64,31 @@
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEEnvelopeSegment : NSObject
-/*! @method initWithEndPoint:curveType
- @abstract Initialize an envelope segment with \a endPoint and \a curveType.
- @param endPoint
- The end point of the segment.
- @param curveType
- The curve type.
- @return
- A new envelope.
- */
-- (instancetype)initWithEndPoint:(PHASEEnvelopePoint)endPoint curveType:(PHASECurveType)curveType;
-
-/*! @property endPoint
- @abstract The end point of the envelope segment.
- @discussion
- The default value is [0.0, 0.0].
- */
-@property(nonatomic, assign) PHASEEnvelopePoint endPoint;
-
-/*! @property curveType
- @abstract The curve type of the envelope segment.
- @discussion
- The default value is PHASECurveTypeLinear.
+/*!
+ @method initWithEndPoint:curveType
+ @abstract Initialize an envelope segment with an endPoint and a curveType.
+ @param endPoint
+ The end point of the segment.
+ @param curveType
+ The curve type.
+ @return
+ A new envelope.
+ */
+- (instancetype)initWithEndPoint:(simd_double2)endPoint curveType:(PHASECurveType)curveType;
+
+/*!
+ @property endPoint
+ @abstract The end point of the envelope segment.
+ @discussion
+ The default value is [0.0, 0.0].
+ */
+@property(nonatomic, assign) simd_double2 endPoint;
+
+/*!
+ @property curveType
+ @abstract The curve type of the envelope segment.
+ @discussion
+ The default value is PHASECurveTypeLinear.
*/
@property(nonatomic, assign) PHASECurveType curveType;
@@ -59,7 +97,8 @@
#pragma mark - PHASEEnvelope
/****************************************************************************************************/
-/*! @class PHASEEnvelope
+/*!
+ @interface PHASEEnvelope
@abstract A segmented envelope.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@@ -68,56 +107,69 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithStartPoint:segments
- @abstract Initialize an envelope from a start point and an array of segments.
- @param startPoint
- The start point of the envelope.
- @param segments
- An array of segments.
- @return
- A new envelope.
- @discussion
- If the segment array is empty (i.e., count == 0), the envelope will internally create a single segment with an end point matching the start
- point. If the segment array has more than one segment, segments will be sorted internally in ascending order of x value. Note that the
- startPoint.x value must be <= the segment with the lowest x value provided in segments. Failure to do so will cause this function to return
- nil.
+/*!
+ @method initWithStartPoint:segments
+ @abstract Initialize an envelope from a start point and an array of segments.
+ @discussion
+ If the segment array is empty (i.e., count == 0), the envelope will internally create a single segment with an end point matching the start point.
+ If the segment array has more than one segment, segments will be sorted internally in ascending order of x value.
+ Note that the startPoint.x value must be <= the segment with the lowest x value provided in segments.
+ Failure to do so will cause this function to return nil.
+ @param startPoint
+ The start point of the envelope.
+ @param segments
+ An array of segments.
+ @return
+ A new envelope.
*/
-- (nullable instancetype)initWithStartPoint:(PHASEEnvelopePoint)startPoint
+- (nullable instancetype)initWithStartPoint:(simd_double2)startPoint
segments:(NSArray<PHASEEnvelopeSegment*>*)segments NS_DESIGNATED_INITIALIZER;
-/*! @method evaluateForValue
- @abstract Evaluates the envelope.
- @param x
- The input along the x-axis.
- @return
- The output along the y-axis.
- @discussion
- If required, x will be clamped to the envelope's domain.
- */
-- (double)evaluateForValue:(double)x;
-
-/*! @property startPoint
- @abstract The start point of the envelope.
- */
-@property(nonatomic, readonly) PHASEEnvelopePoint startPoint;
-
-/*! @property segments
- @abstract The segments of the envelope.
+/*!
+ @method evaluateForValue
+ @abstract Evaluates the envelope.
+ @discussion
+ If required, x will be clamped to the envelope's domain.
+ @param x
+ The input along the x-axis.
+ @return
+ The output along the y-axis.
+ */
+- (double)evaluateForValue:(double)x
+NS_SWIFT_NAME(evaluate(x:));
+
+/*!
+ @property startPoint
+ @abstract The start point of the envelope.
+ */
+@property(nonatomic, readonly) simd_double2 startPoint;
+
+/*!
+ @property segments
+ @abstract The segments of the envelope.
*/
@property(nonatomic, readonly, copy) NSArray<PHASEEnvelopeSegment*>* segments;
-/*! @property domain
- @abstract The [min, max] domain (along the x-axis).
+/*!
+ @property domain
+ @abstract The domain (along the x-axis).
+ @discussion
+ The first value in the pair is the minimum value of the domain.
+ The second value in the pair is the maximum value of the domain.
*/
-@property(nonatomic, readonly) PHASEEnvelopeMinMax domain;
+@property(nonatomic, strong, readonly) PHASENumericPair* domain;
-/*! @property range
- @abstract The [min, max] range (along the y-axis).
+/*!
+ @property range
+ @abstract The range (along the y-axis).
+ @discussion
+ The first value in the pair is the minimum value of the range.
+ The second value in the pair is the maximum value of the range.
*/
-@property(nonatomic, readonly) PHASEEnvelopeMinMax range;
+@property(nonatomic, strong, readonly) PHASENumericPair* range;
@end
NS_ASSUME_NONNULL_END
-#endif /* PHASEEnvelope_Internal_h */
+#endif /* PHASEEnvelope_h */
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGeneratorParameters.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGeneratorParameters.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGeneratorParameters.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGeneratorParameters.h 2021-06-22 17:37:46.000000000 -0400
@@ -0,0 +1,41 @@
+//
+// PHASEGeneratorParameters.h
+// PHASE
+//
+// Copyright © 2019 Apple Inc. All rights reserved.
+//
+
+#ifndef PHASEGeneratorParams_h
+#define PHASEGeneratorParams_h
+
+#import <PHASE/PHASEGroup.h>
+#import <PHASE/PHASETypes.h>
+
+@class PHASENumberMetaParameterDefinition;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/****************************************************************************************************/
+/*! @interface PHASEGeneratorParameters
+ * @abstract An object that holds a standard set of audio parameters common to several objects
+ */
+OS_EXPORT API_DEPRECATED("", macos(10.15, 10.15), ios(14.0,14.0), tvos(15.0,15.0)) API_UNAVAILABLE(watchos)
+@interface PHASEGeneratorParameters : NSObject
+
+/*! @property gain
+ @abstract Linear gain scalar.
+ @note Values are clamped to the range [0, 1]. Default value is 1.
+*/
+@property(nonatomic, assign) double gain;
+
+/*! @property gain
+ @abstract Linear gain scalar.
+ @note Values are clamped to the range [0.25, 4]. Default value is 1.
+*/
+@property(nonatomic, assign) double rate;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* PHASEGeneratorParams_h */
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGroup.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGroup.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGroup.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGroup.h 2021-06-22 17:37:47.000000000 -0400
@@ -15,106 +15,125 @@
NS_ASSUME_NONNULL_BEGIN
/****************************************************************************************************/
-/*! @class PHASEGroup
- @abstract A PHASEGroup allows clients to group sounds into mixing and control hierarchies.
- Clients can set the gain, playback rate, mute and solo all the sounds in a group.
+/*!
+ @interface PHASEGroup
+ @discussion
+ A PHASEGroup allows clients to group sounds into mixing and control hierarchies.
+ Clients can set the gain, playback rate, mute and solo all the sounds in a group.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
-@interface PHASEGroup : NSObject<NSCopying>
+@interface PHASEGroup : NSObject
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithIdentifier:
- @abstract Initialize a new sound group.
+/*!
+ @method initWithIdentifier:
+ @abstract Initialize a new group.
@param identifier
An identifier to reference this group with.
*/
- (instancetype)initWithIdentifier:(NSString*)identifier NS_DESIGNATED_INITIALIZER;
-/*! @method registerWithEngine
- @abstract Registers a group with a particular PHASEEngine so that referencing assets can find it.
- @note An exception will be thrown if the engine is invalid or the group already exists.
+/*!
+ @method registerWithEngine
+ @abstract Registers a group with a particular engine so that referenced assets can find it.
+ @note
+ An exception will be thrown if the engine is invalid or the group already exists.
@param engine
- A PHASEEngine object to associate this group with
+ An engine object to associate this group with.
*/
- (void)registerWithEngine:(PHASEEngine*)engine
NS_SWIFT_NAME(register(engine:));
-/*! @method unregisterFromEngine
+/*!
+ @method unregisterFromEngine
@abstract Removes the group from a PHASEEngine
*/
- (void)unregisterFromEngine;
-/*! @method fadeGain:duration:curveType:
+/*!
+ @method fadeGain:duration:curveType:
@abstract Apply a gain scalar on the base gain over the specified duration.
@param gain
The gain scalar. Values are clamped to the range [0, 1].
@param duration
The duration over which to ramp to the gain scalar. Values must be >= 0.
- @param curveType
- The curve that is applied during the fade period.
- @note
The duration is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
+ @param curveType
+ The type of curve function that is applied during the fade period.
*/
-- (void)fadeGain:(double)gain duration:(double)duration curveType:(PHASECurveType)curveType;
+- (void)fadeGain:(double)gain duration:(double)duration curveType:(PHASECurveType)curveType
+NS_SWIFT_NAME(fadeGain(gain:duration:curveType:));
-/*! @method fadeRate:duration:curveType:
+/*!
+ @method fadeRate:duration:curveType:
@abstract Apply a rate scalar on the base rate over the specified duration.
@param rate
The rate scalar.
@param duration
The duration (scaled by unitsPerSecond) over which to ramp to the rate scalar.
+ The duration is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
@param curveType
The type of curve that is applied during the fade period.
- @note
- The duration is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
*/
-- (void)fadeRate:(double)rate duration:(double)duration curveType:(PHASECurveType)curveType;
+- (void)fadeRate:(double)rate duration:(double)duration curveType:(PHASECurveType)curveType
+NS_SWIFT_NAME(fadeRate(rate:duration:curveType:));
-/*! @method mute
+/*!
+ @method mute
@abstract Mute the group.
*/
- (void)mute;
-/*! @method unmute
+/*!
+ @method unmute
@abstract Unmute the group.
*/
- (void)unmute;
-/*! @method solo
+/*!
+ @method solo
@abstract Solo the group.
*/
- (void)solo;
-/*! @method unsolo
+/*!
+ @method unsolo
@abstract Unsolo the group.
*/
- (void)unsolo;
-/*! @property identifier
- @abstract The unique identifier of this group
+/*!
+ @property identifier
+ @abstract The identifier that uniquely represents this group.
*/
@property(nonatomic, readonly) NSString* identifier;
-/*! @property gain
+/*!
+ @property gain
@abstract Linear gain scalar.
- @note Values are clamped to the range [0, 1]. Default value is 1.
+ @note
+ Values are clamped to the range [0, 1]. Default value is 1.
*/
@property(nonatomic, assign) double gain;
-/*! @property rate
+/*!
+ @property rate
@abstract Linear rate scalar.
- @note Values are clamped to the range [0.25, 4]. Default value is 1.
+ @note
+ Values are clamped to the range [0.25, 4]. Default value is 1.
*/
@property(nonatomic, assign) double rate;
-/*! @property muted
+/*!
+ @property muted
@abstract Whether or not this group is muted.
*/
@property(readonly, getter=isMuted) BOOL muted;
-/*! @property soloed
+/*!
+ @property soloed
@abstract Whether or not this group is soloed.
*/
@property(readonly, getter=isSoloed) BOOL soloed;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGroupPreset.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGroupPreset.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGroupPreset.h 2021-06-02 12:45:09.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEGroupPreset.h 2021-06-17 03:44:27.000000000 -0400
@@ -15,11 +15,12 @@
#pragma mark - PHASEGroupPresetSetting
/****************************************************************************************************/
-/*! @class PHASEGroupPresetSetting
- @abstract A PHASEGroupPresetSetting is an object that holds settings that can be
- applied to a PHASEGroup object.
- @discussion These can be manually created and added to a PHASEGroupPreset
- object, or PHASEGroupPreset addGroup can be used to create these inline.
+/*!
+ @interface PHASEGroupPresetSetting
+ @abstract A PHASEGroupPresetSetting is an object that holds settings that can be applied to a PHASEGroup object.
+ @discussion
+ These can be manually created and added to a PHASEGroupPreset object,
+ or PHASEGroupPreset addGroup can be used to create these inline.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEGroupPresetSetting : NSObject
@@ -27,16 +28,17 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithGain:rate:gainCurveType:rateCurveType
+/*!
+ @method initWithGain:rate:gainCurveType:rateCurveType
@abstract Initialize the PHASEGroupPresetSetting object with an existing PHASEGroup object.
@param gain
The main gain setting to apply to the group. Values are clamped to the range [0, 1]. Default value is 1.
@param rate
The playback rate setting to apply to the group. Values are clamped to the range [0.25, 4]. Default value is 1.
@param gainCurveType
- The type of curve to apply to the gain as the preset changes to this new setting..
+ The type of curve to apply to the gain as the preset changes to this new setting.
@param rateCurveType
- The type of curve to apply to the rate as the preset changes to this new setting..
+ The type of curve to apply to the rate as the preset changes to this new setting.
*/
- (instancetype)initWithGain:(double)gain
rate:(double)rate
@@ -44,23 +46,28 @@
rateCurveType:(PHASECurveType)rateCurveType
NS_SWIFT_NAME(init(gain:rate:gainCurveType:rateCurveType:));
-/*! @property gain
+/*!
+ @property gain
@abstract Linear gain scalar.
- @note Values are clamped to the range [0, 1]. Default value is 1.
+ @note
+ Values are clamped to the range [0, 1]. Default value is 1.
*/
@property(nonatomic, readonly) double gain;
-/*! @property rate
+/*!
+ @property rate
@abstract The playback rate setting to apply to the group
*/
@property(nonatomic, readonly) double rate;
-/*! @property gainCurveType
+/*!
+ @property gainCurveType
@abstract The type of curve to apply to the gain as the preset changes to this new setting..
*/
@property(nonatomic, readonly) PHASECurveType gainCurveType;
-/*! @property rateCurveType
+/*!
+ @property rateCurveType
@abstract The type of curve to apply to the rate as the preset changes to this new setting..
*/
@property(nonatomic, readonly) PHASECurveType rateCurveType;
@@ -70,11 +77,12 @@
#pragma mark - PHASEGroupPreset
/****************************************************************************************************/
-/*! @class PHASEGroupPreset
- @abstract A PHASEGroupPreset holds a collection of PHASEGroupPresetSetting
- objects and other parameters to be applied all at once during playback.
- @discussion Initialize beforehand, and use activate/deactivate to switch the
- new preset during playback. Activating a preset will automatically deactivate the current one.
+/*!
+ @interface PHASEGroupPreset
+ @abstract A PHASEGroupPreset holds a collection of PHASEGroupPresetSetting objects and other parameters to be applied all at once during playback.
+ @discussion
+ Initialize beforehand, and use activate or deactivate to switch to the new preset during playback.
+ Activating a preset will automatically deactivate the current one.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEGroupPreset : NSObject
@@ -82,7 +90,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithEngine
+/*!
+ @method initWithEngine
@abstract
Create a new PHASEGroupPreset object with a given PHASEEngine object.
@param engine
@@ -95,62 +104,72 @@
The time interval that all group settings in this preset will take to gradually fade to the unity value
@note
The timeToTarget and timeToReset are scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
- */
+*/
- (instancetype)initWithEngine:(PHASEEngine*)engine
- settings:(NSDictionary<PHASEGroup*, PHASEGroupPresetSetting*>*)settings
+ settings:(NSDictionary<NSString*, PHASEGroupPresetSetting*>*)settings
timeToTarget:(double)timeToTarget
timeToReset:(double)timeToReset NS_DESIGNATED_INITIALIZER;
-/*! @property settings
+/*!
+ @property settings
@abstract The collection of PHASEGroupPresetSetting objects to apply when this preset is activated.
*/
-@property(nonatomic, readonly) NSDictionary<PHASEGroup*, PHASEGroupPresetSetting*>* settings;
+@property(nonatomic, readonly) NSDictionary<NSString*, PHASEGroupPresetSetting*>* settings;
-/*! @property timeToTarget
+/*!
+ @property timeToTarget
@abstract The time interval that all group settings in this preset will take to gradually fade to the new value
- @note The timeToTarget is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
+ @note
+ The timeToTarget is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
*/
@property(nonatomic, readonly) double timeToTarget;
/*! @property timeToReset
@abstract The time interval that all group settings in this preset will take to gradually fade to the unity value
- @note The timeToReset is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
+ @note
+ The timeToReset is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
*/
@property(nonatomic, readonly) double timeToReset;
-/*! @method activate
+/*!
+ @method activate
@abstract
- Activate this preset in the PHASEEngine object it was initialized with. The current preset will be deactivated automatically.
+ Activate this preset in the PHASEEngine object it was initialized with. The internal timeToTarget value is used.
+ The current preset will be deactivated automatically.
*/
- (void)activate;
-/*! @method activateWithOverrideTimeInterval
+/*!
+ @method activateWithTimeToTargetOverride
@abstract
- Activate this preset in the PHASEEngine object it was initialized with. The current preset will be deactivated automatically.
- @param overrideTimeInterval
+ Activate this preset in the PHASEEngine object it was initialized with.
+ The current preset will be deactivated automatically.
+ @param timeToTargetOverride
Override the timeToTarget value in the preset with this value.
@note
- The overrideTimeInterval is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
+ The timeToTargetOverride is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
*/
-- (void)activateWithOverrideTimeInterval:(double)overrideTimeInterval
-NS_SWIFT_NAME(activate(overrideTimeInterval:));
+- (void)activateWithTimeToTargetOverride:(double)timeToTargetOverride
+NS_SWIFT_NAME(activate(timeToTargetOverride:));
-/*! @method deactivate
+/*!
+ @method deactivate
@abstract
- Deactivate this preset and return the system to default unity values.
+ Deactivate this preset and return the system to default unity values. The internal timeToReset value is used.
*/
- (void)deactivate;
-/*! @method deactivateWithOverrideTimeInterval
+/*!
+ @method deactivateWithTimeToResetOverride
@abstract
Deactivate this preset and return the system to default unity values.
- @param overrideTimeInterval
+ @param timeToResetOverride
Override the timeToReset value in the preset with this value.
@note
- The overrideTimeInterval is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
+ The timeToResetOverride is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
*/
-- (void)deactivateWithOverrideTimeInterval:(double)overrideTimeInterval
-NS_SWIFT_NAME(deactivate(overrideTimeInterval:));
+- (void)deactivateWithTimeToResetOverride:(double)timeToResetOverride
+NS_SWIFT_NAME(deactivate(timeToResetOverride:));
@end
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEListener.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEListener.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEListener.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEListener.h 2021-06-22 17:37:47.000000000 -0400
@@ -16,8 +16,9 @@
NS_ASSUME_NONNULL_BEGIN
/****************************************************************************************************/
-/*! @class PHASEListener
- @abstract A PHASEListener represents a listener within a 3D virtual audio environment.
+/*!
+ @interface PHASEListener
+ @abstract A PHASEListener represents the listener's point of view within the simulated acoustic scene.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEListener : PHASEObject
@@ -25,14 +26,17 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithEngine:
+/*!
+ @method initWithEngine:
@abstract Initialize a new listener.
*/
- (instancetype)initWithEngine:(PHASEEngine*)engine NS_DESIGNATED_INITIALIZER;
-/*! @property gain
+/*!
+ @property gain
@abstract Linear gain scalar.
- @note Values are clamped to the range [0, 1]. Default value is 1.
+ @note
+ Values are clamped to the range [0, 1]. Default value is 1.
*/
@property(nonatomic, assign) double gain;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMaterial.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMaterial.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMaterial.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMaterial.h 2021-06-22 17:37:47.000000000 -0400
@@ -16,34 +16,32 @@
#pragma mark - PHASEMaterialPreset
-/*! @enum PHASEMaterialPreset
- @abstract List of material presets
+/*!
+ @enum PHASEMaterialPreset
+ @abstract Material preset
*/
typedef NS_ENUM(NSInteger, PHASEMaterialPreset) {
- PHASEMaterialPresetDefault,
- PHASEMaterialPresetWood,
- PHASEMaterialPresetCardboard,
- PHASEMaterialPresetGlass,
- PHASEMaterialPresetBrickwork,
- PHASEMaterialPresetConcrete,
- PHASEMaterialPresetGypsumBoard,
- PHASEMaterialPresetDrywall,
- PHASEMaterialPresetPlaster,
- PHASEMaterialPresetDoorWoodLight,
- PHASEMaterialPresetDoorWoodHeavy,
- PHASEMaterialPresetDoorMetalLight,
- PHASEMaterialPresetDoorMetalHeavy,
- PHASEMaterialPresetDoorSoundproof,
- PHASEMaterialPresetWindowSinglePane,
- PHASEMaterialPresetWindowDoublePane
+ PHASEMaterialPresetDefault = 'mDef',
+ PHASEMaterialPresetCardboard = 'mCrd',
+ PHASEMaterialPresetGlass = 'mGls',
+ PHASEMaterialPresetBrickwork = 'mBrk',
+ PHASEMaterialPresetConcrete = 'mCcr',
+ PHASEMaterialPresetGypsumBoard = 'mGyp',
+ PHASEMaterialPresetDrywall = 'mDrw',
+ PHASEMaterialPresetDoorWoodLight = 'mDWL',
+ PHASEMaterialPresetDoorWoodHeavy = 'mDWH',
+ PHASEMaterialPresetDoorSoundproof = 'mDsp',
+ PHASEMaterialPresetWindowSinglePane = 'mWsp',
+ PHASEMaterialPresetWindowDoublePane = 'mWdp',
};
#pragma mark - PHASEMaterial
/****************************************************************************************************/
-/*! @type PHASEMaterial
- @abstract A PHASEMaterial describes the acoustic properties of material through a library of presets
+/*!
+ @interface PHASEMaterial
+ @abstract A PHASEMaterial describes the acoustic properties of a material.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEMaterial : NSObject
@@ -51,7 +49,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithEngine:preset
+/*!
+ @method initWithEngine:preset
@abstract Initialize a new material from a preset.
*/
- (instancetype)initWithEngine:(PHASEEngine*)engine preset:(PHASEMaterialPreset)preset;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMedium.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMedium.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMedium.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMedium.h 2021-06-22 17:37:47.000000000 -0400
@@ -14,18 +14,20 @@
@class PHASEEngine;
-/*! @enum PHASEMediumPreset
- @abstract List of medium presets
+/*!
+ @enum PHASEMediumPreset
+ @abstract Medium preset
*/
typedef NS_ENUM(NSInteger, PHASEMediumPreset) {
- PHASEMediumPresetDefault = 0,
- PHASEMediumPresetRoomAir = 1,
+ PHASEMediumPresetDefault = 'mdDf',
+ PHASEMediumPresetRoomAir = 'mdRA',
}
NS_SWIFT_NAME(PHASEMedium.Preset);
/****************************************************************************************************/
-/*! @class PHASEMedium
- @abstract A PHASEMedium describes the acoustic properties of a medium through a library of presets.
+/*!
+ @interface PHASEMedium
+ @abstract A PHASEMedium describes the acoustic properties of a medium.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEMedium : NSObject
@@ -33,7 +35,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithEngine:preset
+/*!
+ @method initWithEngine:preset
@abstract Initialize a new medium from a preset.
*/
- (instancetype)initWithEngine:(PHASEEngine*)engine preset:(PHASEMediumPreset)preset;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMetaParameter.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMetaParameter.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMetaParameter.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMetaParameter.h 2021-06-22 17:34:48.000000000 -0400
@@ -17,8 +17,9 @@
#pragma mark - PHASEMetaParameterDefinition
/****************************************************************************************************/
-/*! @interface PHASEMetaParameterDefinition
- * @abstract A base object for Metaparameter definitions
+/*!
+ @interface PHASEMetaParameterDefinition
+ @abstract A base object for metaparameter definitions
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEMetaParameterDefinition : PHASEDefinition
@@ -26,8 +27,9 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @property value
- @abstract The readonly value that this metaparameter definition was initialized with
+/*!
+ @property value
+ @abstract The value of the metaparameter.
*/
@property(nonatomic, readonly, strong) id value;
@@ -36,8 +38,9 @@
#pragma mark - PHASENumberMetaParameterDefinition
/****************************************************************************************************/
-/*! @interface PHASENumberMetaParameterDefinition
- * @abstract A Metaparameter that has a numeric value
+/*!
+ @interface PHASENumberMetaParameterDefinition
+ @abstract A metaparameter that has a numeric value
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASENumberMetaParameterDefinition : PHASEMetaParameterDefinition
@@ -45,7 +48,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithValue:identifier
+/*!
+ @method initWithValue:identifier
@abstract
Create a new numeric metaparameter definition
@param value
@@ -57,7 +61,8 @@
*/
- (instancetype)initWithValue:(double)value identifier:(NSString*)identifier;
-/*! @method initWithValue
+/*!
+ @method initWithValue
@abstract
Create a new numeric metaparameter definition
@param value
@@ -67,7 +72,8 @@
*/
- (instancetype)initWithValue:(double)value;
-/*! @method initWithValue:rangeMin:rangeMax:identifier
+/*!
+ @method initWithValue:minimum:maximum:identifier
@abstract
Create a new numeric metaparameter definition and a predefined min and maximum range
@param value
@@ -83,7 +89,8 @@
*/
- (instancetype)initWithValue:(double)value minimum:(double)minimum maximum:(double)maximum identifier:(NSString*)identifier;
-/*! @method initWithValue:rangeMin:rangeMax
+/*!
+ @method initWithValue:minimum:maximum
@abstract
Create a new numeric metaparameter definition and a predefined min and maximum range
@param value
@@ -98,12 +105,14 @@
- (instancetype)initWithValue:(double)value minimum:(double)minimum maximum:(double)maximum NS_DESIGNATED_INITIALIZER;
-/*! @property minimum
+/*!
+ @property minimum
@abstract The readonly minimum that this metaparameter definition was initialized with
*/
@property(nonatomic, readonly) double minimum;
-/*! @property maximum
+/*!
+ @property maximum
@abstract The readonly maximum that this metaparameter definition was initialized with
*/
@property(nonatomic, readonly) double maximum;
@@ -113,8 +122,9 @@
#pragma mark - PHASEStringMetaParameterDefinition
/****************************************************************************************************/
-/*! @interface PHASEStringMetaParameterDefinition
- * @abstract A Metaparameter that has a string value
+/*!
+ @interface PHASEStringMetaParameterDefinition
+ @abstract A Metaparameter that has a string value
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEStringMetaParameterDefinition : PHASEMetaParameterDefinition
@@ -122,7 +132,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithValue:identifier
+/*!
+ @method initWithValue:identifier
@abstract
Create a new string metaparameter definition
@param value
@@ -134,7 +145,8 @@
*/
- (instancetype)initWithValue:(NSString*)value identifier:(NSString*)identifier;
-/*! @method initWithValue
+/*!
+ @method initWithValue
@abstract
Create a new string metaparameter definition
@param value
@@ -149,8 +161,9 @@
#pragma mark - PHASEMappedMetaParameterDefinition
/****************************************************************************************************/
-/*! @interface PHASEMappedMetaParameterDefinition
- * @abstract An object to define a Mapped Metaparameter when building an sound event.
+/*!
+ @interface PHASEMappedMetaParameterDefinition
+ @abstract An object to define a Mapped Metaparameter when building an sound event.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEMappedMetaParameterDefinition : PHASENumberMetaParameterDefinition
@@ -166,7 +179,8 @@
- (instancetype)initWithValue:(double)value minimum:(double)minimum maximum:(double)maximum NS_UNAVAILABLE;
-/*! @method initWithInputMetaParameterDefinition:identifier
+/*!
+ @method initWithInputMetaParameterDefinition:identifier
@abstract
Create a new mapped range metaparameter definition
@param inputMetaParameterDefinition
@@ -180,7 +194,8 @@
envelope:(PHASEEnvelope*)envelope
identifier:(NSString*)identifier;
-/*! @method initWithInputMetaParameterDefinition
+/*!
+ @method initWithInputMetaParameterDefinition
@abstract
Create a new mapped range metaparameter definition
@param inputMetaParameterDefinition
@@ -191,12 +206,14 @@
- (instancetype)initWithInputMetaParameterDefinition:(PHASENumberMetaParameterDefinition*)inputMetaParameterDefinition
envelope:(PHASEEnvelope*)envelope NS_DESIGNATED_INITIALIZER;
-/*! @property envelope
+/*!
+ @property envelope
@abstract An Envelope to define segments of curves
*/
@property(nonatomic, readonly, strong) PHASEEnvelope* envelope;
-/*! @property inputMetaParameterDefinition
+/*!
+ @property inputMetaParameterDefinition
@abstract The readonly PHASENumberMetaParameterDefinition that this metaparameter definition was initialized with
*/
@property(nonatomic, readonly, strong) PHASENumberMetaParameterDefinition* inputMetaParameterDefinition;
@@ -210,8 +227,9 @@
#pragma mark - PHASEMetaParameter
/****************************************************************************************************/
-/*! @interface PHASEMetaParameter
- * @abstract A generic object that represents an active metaparameter in the system
+/*!
+ @interface PHASEMetaParameter
+ @abstract A generic object that represents an active metaparameter in the system
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEMetaParameter : NSObject
@@ -219,12 +237,14 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @property identifier
- @abstract The identifier of this metaparameter
+/*!
+ @property identifier
+ @abstract The identifier that uniquely represents this metaparameter.
*/
@property(nonatomic, readonly, strong) NSString* identifier;
-/*! @property value
+/*!
+ @property value
@abstract The value of this metaparameter
*/
@property(nonatomic, readwrite, strong) id value;
@@ -234,8 +254,9 @@
#pragma mark - PHASENumberMetaParameter
/****************************************************************************************************/
-/*! @interface PHASENumberMetaParameter
- * @abstract An object that represents an active numeric metaparameter in the system
+/*!
+ @interface PHASENumberMetaParameter
+ @abstract An object that represents an active numeric metaparameter in the system
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASENumberMetaParameter : PHASEMetaParameter
@@ -243,17 +264,20 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @property minimum
+/*!
+ @property minimum
@abstract The minimum value this metaparameter can be set to
*/
@property(nonatomic, readonly) double minimum;
-/*! @property maximum
+/*!
+ @property maximum
@abstract The maximum value this metaparameter can be set to
*/
@property(nonatomic, readonly) double maximum;
-/*! @method fadeToValue
+/*!
+ @method fadeToValue
@abstract
Fades to a new value over an interval of time
@param value
@@ -261,15 +285,17 @@
@param duration
The length of time it takes to arrive at the destination value
*/
-- (void)fadeToValue:(double)value duration:(NSTimeInterval)duration;
+- (void)fadeToValue:(double)value duration:(NSTimeInterval)duration
+NS_SWIFT_NAME(fade(value:duration:));
@end
#pragma mark - PHASEStringMetaParameter
/****************************************************************************************************/
-/*! @interface PHASEStringMetaParameter
- * @abstract An object that represents an active string metaparameter in the system
+/*!
+ @interface PHASEStringMetaParameter
+ @abstract An object that represents an active string metaparameter in the system
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEStringMetaParameter : PHASEMetaParameter
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMixer.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMixer.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMixer.h 2021-06-02 12:45:10.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEMixer.h 2021-06-17 14:34:30.000000000 -0400
@@ -27,8 +27,9 @@
#pragma mark - PHASEMixerDefinition
/****************************************************************************************************/
-/*! @interface PHASEMixerDefinition
- * @abstract A generic object to define a mix node object.
+/*!
+ @interface PHASEMixerDefinition
+ @abstract An base object that defines how audio is rendered to the output.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEMixerDefinition : PHASEDefinition
@@ -36,13 +37,16 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @property gain
+/*!
+ @property gain
@abstract Linear gain scalar.
- @note Values are clamped to the range [0, 1]. Default value is 1.
+ @note
+ Values are clamped to the range [0, 1]. Default value is 1.
*/
@property(nonatomic) double gain;
-/*! @property gainMetaParameterDefinition
+/*!
+ @property gainMetaParameterDefinition
@abstract Optionally attach a metaparameter definition here to enable real-time control of the gain during playback.
*/
@property(nonatomic, strong, nullable) PHASENumberMetaParameterDefinition* gainMetaParameterDefinition;
@@ -52,8 +56,11 @@
#pragma mark - PHASESpatialMixerDefinition
/****************************************************************************************************/
-/*! @interface PHASESpatialMixerDefinition
- * @abstract An object to define a spatial mix node object.
+/*!
+ @interface PHASESpatialMixerDefinition
+ @abstract Spatial mixer definition.
+ @discussion
+ Spatial mixers render audio with spatialization and environmental effects.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASESpatialMixerDefinition : PHASEMixerDefinition
@@ -61,7 +68,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithSpatialPipeline
+/*!
+ @method initWithSpatialPipeline
@abstract Create a new PHASESpatialMixerDefinition
@param spatialPipeline
A spatial pipeline.
@@ -70,7 +78,8 @@
*/
- (instancetype)initWithSpatialPipeline:(PHASESpatialPipeline*)spatialPipeline NS_DESIGNATED_INITIALIZER;
-/*! @method initWithSpatialPipeline:identifier
+/*!
+ @method initWithSpatialPipeline:identifier
@abstract Create a new PHASESpatialMixerDefinition
@param spatialPipeline
A spatial pipeline.
@@ -81,22 +90,26 @@
*/
- (instancetype)initWithSpatialPipeline:(PHASESpatialPipeline*)spatialPipeline identifier:(NSString*)identifier;
-/*! @property spatialPipeline
+/*!
+ @property spatialPipeline
@abstract Spatial Pipeline.
*/
@property(nonatomic, strong, readonly) PHASESpatialPipeline* spatialPipeline;
-/*! @property distanceModelParameters
+/*!
+ @property distanceModelParameters
@abstract Distance model parameters (optional).
*/
@property(nullable, nonatomic, strong) PHASEDistanceModelParameters* distanceModelParameters;
-/*! @property listenerDirectivityModelParameters
+/*!
+ @property listenerDirectivityModelParameters
@abstract Listener directivity model parameters (optional).
*/
@property(nullable, nonatomic, strong) PHASEDirectivityModelParameters* listenerDirectivityModelParameters;
-/*! @property sourceDirectivityModelParameters
+/*!
+ @property sourceDirectivityModelParameters
@abstract Source directivity model parameters (optional).
*/
@property(nullable, nonatomic, strong) PHASEDirectivityModelParameters* sourceDirectivityModelParameters;
@@ -106,8 +119,14 @@
#pragma mark - PHASEAmbientMixerDefinition
/****************************************************************************************************/
-/*! @interface PHASEAmbientMixerDefinition
- * @abstract An object to define an ambient mix node object.
+/*!
+ @interface PHASEAmbientMixerDefinition
+ @abstract Ambient mixer definition.
+ @discussion
+ Ambient mixers render audio with spatialization but without environmental effects.
+ @note
+ Ambient mixers do not support distance modeling or directivity modeling.
+ Clients can however set the orientation at initialization time.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEAmbientMixerDefinition : PHASEMixerDefinition
@@ -115,7 +134,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithChannelLayout:orientation:identifier
+/*!
+ @method initWithChannelLayout:orientation:identifier
@abstract Create a new PHASEAmbientMixerDefinition
@param layout
The input channel layout for this ambient mixer node. Any connected sampler must match this channel layout.
@@ -126,25 +146,30 @@
@return
A new PHASEAmbientMixerDefinition object
*/
-- (instancetype)initWithChannelLayout:(AVAudioChannelLayout*)layout orientation:(simd_quatf)orientation identifier:(NSString*)identifier;
+- (instancetype)initWithChannelLayout:(AVAudioChannelLayout*)layout orientation:(simd_quatf)orientation identifier:(NSString*)identifier
+NS_SWIFT_NAME(init(channelLayout:orientation:identifier:));
-/*! @method initWithChannelLayout:orientation
+/*!
+ @method initWithChannelLayout:orientation
@abstract Create a new PHASEAmbientMixerDefinition
@param layout
The input channel layout for this channel mixer node. Any connected sampler must match this channel layout.
@param orientation
- The orientation of the speaker layout, relative to scene root, as a quaternion.
+ The orientation of the speaker layout, relative to scene root, as a quaternion.
@return
A new PHASEAmbientMixerDefinition object
*/
-- (instancetype)initWithChannelLayout:(AVAudioChannelLayout*)layout orientation:(simd_quatf)orientation NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithChannelLayout:(AVAudioChannelLayout*)layout orientation:(simd_quatf)orientation NS_DESIGNATED_INITIALIZER
+NS_SWIFT_NAME(init(channelLayout:orientation:));
-/*! @property orientation
+/*!
+ @property orientation
@abstract A readonly value of the ambient source's orientation relative to the scene root.
*/
@property(nonatomic, readonly) simd_quatf orientation;
-/*! @property inputChannelLayout
+/*!
+ @property inputChannelLayout
@abstract A readonly value of the input channel layout this mixer was initialized with.
*/
@property(nonatomic, strong, readonly) AVAudioChannelLayout* inputChannelLayout;
@@ -154,8 +179,11 @@
#pragma mark - PHASEChannelMixerDefinition
/****************************************************************************************************/
-/*! @interface PHASEChannelMixerDefinition
- * @abstract An object to define a channel mix node object.
+/*!
+ @interface PHASEChannelMixerDefinition
+ @abstract Channel mixer definition.
+ @discussion
+ Channel mixers render audio without spatialization or environmental effects.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEChannelMixerDefinition : PHASEMixerDefinition
@@ -163,7 +191,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithChannelLayout:mode:identifier
+/*!
+ @method initWithChannelLayout:mode:identifier
@abstract Create a new PHASEChannelMixerDefinition
@param layout
The input channel layout for this channel mixer node. Any connected sampler must match this channel layout.
@@ -172,18 +201,22 @@
@return
A new PHASEChannelMixerDefinition object
*/
-- (instancetype)initWithChannelLayout:(AVAudioChannelLayout*)layout identifier:(NSString*)identifier;
+- (instancetype)initWithChannelLayout:(AVAudioChannelLayout*)layout identifier:(NSString*)identifier
+NS_SWIFT_NAME(init(channelLayout:identifier:));
-/*! @method initWithChannelLayout:mode
+/*!
+ @method initWithChannelLayout:mode
@abstract Create a new PHASEChannelMixerDefinition
@param layout
The input channel layout for this channel mixer node. Any connected sampler must match this channel layout.
@return
A new PHASEChannelMixerDefinition object
*/
-- (instancetype)initWithChannelLayout:(AVAudioChannelLayout*)layout NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithChannelLayout:(AVAudioChannelLayout*)layout NS_DESIGNATED_INITIALIZER
+NS_SWIFT_NAME(init(channelLayout:));
-/*! @property inputChannelLayout
+/*!
+ @property inputChannelLayout
@abstract A readonly value of the input channel layout this mixer was initialized with.
*/
@property(nonatomic, strong, readonly) AVAudioChannelLayout* inputChannelLayout;
@@ -194,8 +227,9 @@
#pragma mark - PHASEMixer
/****************************************************************************************************/
-/*! @interface PHASEMixer
- * @abstract A generic object the represents an active mixer in the system
+/*!
+ @interface PHASEMixer
+ @abstract A generic object the represents an active mixer in the system
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEMixer : NSObject
@@ -203,36 +237,39 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
+/*!
+ @property identifier
+ @abstract The identifier that uniquely represents this mixer.
+*/
@property(nonatomic, readonly, strong) NSString* identifier;
-/*! @property gain
+/*!
+ @property gain
@abstract Linear gain scalar.
@note Values are clamped to the range [0, 1]. Default value is 1.
*/
@property(nonatomic, readonly) double gain;
-/*! @property gainMetaParameter
+/*!
+ @property gainMetaParameter
@abstract The metaparameter that can be used to adjust the gain during playback
*/
@property(nonatomic, strong, readonly, nullable) PHASEMetaParameter* gainMetaParameter;
-/*! @property mixerType
- @abstract The mixer type
-*/
-@property(nonatomic, readwrite) PHASEMixerType mixerType;
-
@end
#pragma mark - PHASEMixerParameters
/****************************************************************************************************/
-/*! @interface PHASEMixerParameters
- * @abstract An object that holds runtime parameters for mixers when creating PHASESoundEvents.
+/*!
+ @interface PHASEMixerParameters
+ @abstract An object that holds runtime parameters for mixers when creating PHASESoundEvents.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEMixerParameters : NSObject
-/*! @method addSpatialMixerParametersWithIdentifier:source:listener
+/*!
+ @method addSpatialMixerParametersWithIdentifier:source:listener
@abstract Adds runtime parameters for a spatial mixer
@param identifier
The unique identifier assigned to a spatial submixer object.
@@ -244,7 +281,8 @@
- (void)addSpatialMixerParametersWithIdentifier:(NSString*)identifier source:(PHASESource*)source listener:(PHASEListener*)listener
NS_SWIFT_NAME(addSpatialMixerParameters(identifier:source:listener:));
-/*! @method addAmbientMixerParametersWithIdentifier:listener
+/*!
+ @method addAmbientMixerParametersWithIdentifier:listener
@abstract Adds runtime parameters for an ambient mixer
@param identifier
The unique identifier assigned to a spatial submixer object.
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEObject.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEObject.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEObject.h 2021-06-02 12:48:06.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEObject.h 2021-06-22 17:37:46.000000000 -0400
@@ -17,8 +17,9 @@
NS_ASSUME_NONNULL_BEGIN
/****************************************************************************************************/
-/*! @class PHASEObject
- @abstract A PHASEObject represents an object in the engine object hierarchy.
+/*!
+ @interface PHASEObject
+ @abstract A PHASEObject represents a 3D object in the engine, which can be organized into a hierarchy with relative transforms.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@@ -27,66 +28,81 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithEngine:
+/*!
+ @method initWithEngine:
@abstract Initialize a new object.
*/
- (instancetype)initWithEngine:(PHASEEngine*)engine NS_DESIGNATED_INITIALIZER;
-/*! @method addChild:error:
- @abstract Add a child to the current object
+/*!
+ @method addChild:error:
+ @abstract Add a child to this object
@param child
The child object
@param error
- Returns error if the child already has a parent different from the current object.
+ Returns an error if the child already has a parent different from this object.
@return
YES for success
*/
-- (BOOL)addChild:(PHASEObject*)child error:(NSError**)error;
+- (BOOL)addChild:(PHASEObject*)child error:(NSError**)error
+NS_SWIFT_NAME(addChild(child:));
-/*! @method removeChild:
- @abstract Remove a child from the current object.
-*/
-- (void)removeChild:(PHASEObject*)child;
-
-/*! @method removeChildren
- @abstract Remove all the children from the current object.
+/*!
+ @method removeChild:
+ @abstract Remove a child from this object.
+*/
+- (void)removeChild:(PHASEObject*)child
+NS_SWIFT_NAME(removeChild(child:));
+
+/*!
+ @method removeChildren
+ @abstract Remove all the children from this object
*/
- (void)removeChildren;
-/*! @property parent
- @abstract The parent of the current object, nil if not attached to a parent.
+/*!
+ @property parent
+ @abstract The parent of this object, or nil if this object doesn't have a parent object.
*/
@property(nullable, nonatomic, readonly, weak) PHASEObject* parent;
-/*! @property children
- @abstract List of all the direct children of the current object.
+/*!
+ @property children
+ @abstract The children of this object.
*/
@property(nonatomic, readonly, copy) NSArray<PHASEObject*>* children;
-/*! @property right
+/*!
+ @property right
@abstract The direction PHASE treats as "right" in local space for all objects.
*/
@property(class, readonly) simd_float3 right;
-/*! @property up
+/*!
+ @property up
@abstract The direction PHASE treats as "up" in local space for all objects.
*/
@property(class, readonly) simd_float3 up;
-/*! @property forward
+/*!
+ @property forward
@abstract The direction PHASE treats as "forward" in local space for all objects.
*/
@property(class, readonly) simd_float3 forward;
-/*! @property transform
+/*!
+ @property transform
@abstract The object's transform.
- @note The transform must have orthogonal basis vectors and uniform scale.
+ @note
+ The transform must have orthogonal basis vectors and uniform scale.
*/
@property(nonatomic, assign) simd_float4x4 transform;
-/*! @property worldTransform
+/*!
+ @property worldTransform
@abstract The world transform applied to the object.
- @note The transform must have orthogonal basis vectors and uniform scale.
+ @note
+ The transform must have orthogonal basis vectors and uniform scale.
*/
@property(nonatomic, assign) simd_float4x4 worldTransform;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEOccluder.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEOccluder.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEOccluder.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEOccluder.h 2021-06-22 17:37:46.000000000 -0400
@@ -17,9 +17,9 @@
NS_ASSUME_NONNULL_BEGIN
/****************************************************************************************************/
-/*! @class PHASEOccluder
- @abstract A PHASEOccluder represents an shape and associated material that can occlude or dampen sound in a 3D virtual audio enivronment.
- @discussion ..
+/*!
+ @interface PHASEOccluder
+ @abstract A PHASEOccluder represents a shape and associated material that can affect sound transmission within the simulated acoustic scene.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEOccluder : PHASEObject
@@ -29,14 +29,16 @@
- (instancetype)initWithEngine:(PHASEEngine*)engine NS_UNAVAILABLE;
-/*! @method initWithEngine:shapes:
+/*!
+ @method initWithEngine:shapes:
@abstract Initialize a new occluder with shapes.
@discussion
The shapes array cannot be empty, otherwise an exception is thrown.
*/
- (instancetype)initWithEngine:(PHASEEngine*)engine shapes:(NSArray<PHASEShape*>*)shapes NS_DESIGNATED_INITIALIZER;
-/*! @property shapes
+/*!
+ @property shapes
@abstract Array of shapes associated with this occluder.
*/
@property(nonatomic, readonly, copy) NSArray<PHASEShape*>* shapes;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEShape.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEShape.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEShape.h 2021-06-02 12:48:06.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASEShape.h 2021-06-22 17:37:46.000000000 -0400
@@ -17,16 +17,19 @@
NS_ASSUME_NONNULL_BEGIN
/****************************************************************************************************/
-/*! @class PHASEShapeElement
+/*!
+ @interface PHASEShapeElement
@abstract A single element within a shape. The attached material defines its acoustical properties.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
+NS_SWIFT_NAME(PHASEShape.Element)
@interface PHASEShapeElement : NSObject
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @property material
+/*!
+ @property material
@abstract The shape's material defines the acoustical properties of this element.
*/
@property(nullable, nonatomic, strong) PHASEMaterial* material;
@@ -34,9 +37,9 @@
@end
/****************************************************************************************************/
-/*! @class PHASEShape
- @abstract A three-dimensional shape that is used as the physical representation of a PHASEObject within a scene. Is made up of multiple
- PHASEShapeElements.
+/*!
+ @interface PHASEShape
+ @abstract A three-dimensional shape that is used as the physical representation of a source or occluder in a scene.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEShape : NSObject<NSCopying>
@@ -44,20 +47,26 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithEngine:mesh
- @abstract Initialize a shape from an MDLMesh
+/*!
+ @method initWithEngine:mesh
+ @abstract Initialize a shape from a mesh.
+ @discussion
+ One PHASEShapeElement will be created for every submesh within the mesh.
+ @note
+ A single shape can be used to create multiple instances of sources and occluders.
+ For example, a client could create a single shape for a window, then create multiple occluders from it.
+ The same can be done with with sources.
@param engine
- The engine this shape will be used with
+ The engine this shape will be used with.
@param mesh
A Model I/O mesh object.
@return
A new shape object
- @discussion
- One PHASEShapeElement will be created for every submesh within the mesh
*/
- (instancetype)initWithEngine:(PHASEEngine*)engine mesh:(MDLMesh*)mesh NS_DESIGNATED_INITIALIZER;
-/*! @method initWithEngine:mesh
+/*!
+ @method initWithEngine:mesh
@abstract Initialize a shape from an MDLMesh and a list of materials
@param engine
The engine this shape will be used with
@@ -70,13 +79,14 @@
@discussion
The materials array cannot be empty and cannot contain nil entries, otherwise an exception is thrown.
If the number of submeshes within the mesh are less than or equal to the size of the material array, the material will be assigned
- to the corresponding element. If the number of submeshes within the mesh is greater than the size of the material array, the material
- assigned to the element will be the index of the element modulo the number of materials. IE: given a mesh with 6 submeshes and an array
- of 3 materials, the element at index 5 will be assigned the material at index: 5 % 3 = 2.
+ to the corresponding element. If the number of submeshes within the mesh is greater than the size of the material array, the material
+ assigned to the element will be the index of the element modulo the number of materials. IE: given a mesh with 6 submeshes and an array
+ of 3 materials, the element at index 5 will be assigned the material at index: 5 % 3 = 2.
*/
- (instancetype)initWithEngine:(PHASEEngine*)engine mesh:(MDLMesh*)mesh materials:(NSArray<PHASEMaterial*>*)materials;
-/*! @property elements
+/*!
+ @property elements
@abstract List of all the shape elements associated with this shape.
*/
@property(nonatomic, readonly, copy) NSArray<PHASEShapeElement*>* elements;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEvent.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEvent.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEvent.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEvent.h 2021-06-22 17:37:47.000000000 -0400
@@ -8,7 +8,7 @@
#ifndef PHASESoundEvent_h
#define PHASESoundEvent_h
-#import <AVFoundation/AVAudioTime.h>
+#import <AVFAudio/AVAudioTime.h>
#import <PHASE/PHASETypes.h>
@class PHASESoundEventNodeAsset;
@@ -24,7 +24,8 @@
NS_ASSUME_NONNULL_BEGIN
/****************************************************************************************************/
-/*! @class PHASESoundEvent
+/*!
+ @interface PHASESoundEvent
@abstract A PHASESoundEvent is an object that represents a playable sound event in the PHASE system.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@@ -33,12 +34,14 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithEngine:assetIdentifier:mixerParameters:error
+/*!
+ @method initWithEngine:assetIdentifier:mixerParameters:error
@abstract Creates a new sound event instance
@param engine
The PHASEEngine object that the sound event will be played by.
@param assetIdentifier
- The identifier registered with the Asset Registry for the particular PHASESoundEventNodeAsset that this sound instance will play. If the asset identifier is not registered, this function will fail.
+ The identifier registered with the Asset Registry for the particular PHASESoundEventNodeAsset that this sound instance will play.
+ If the asset identifier is not registered, this function will fail.
@param mixerParameters
A dictionary of PHASEMixerParameters objects with keys that match the identifiers of the spatial mixers in the sound event
@discussion
@@ -49,12 +52,14 @@
mixerParameters:(PHASEMixerParameters*)mixerParameters
error:(NSError**)error;
-/*! @method initWithEngine:assetIdentifier:error
+/*!
+ @method initWithEngine:assetIdentifier:error
@abstract Creates a new sound event instance
@param engine
The PHASEEngine object that the sound event will be played by.
@param assetIdentifier
- The identifier registered with the Asset Registry for the particular PHASESoundEventNodeAsset that this sound event will play. If the asset identifier is not registered, this function will fail.
+ The identifier registered with the Asset Registry for the particular PHASESoundEventNodeAsset that this sound event will play.
+ If the asset identifier is not registered, this function will fail.
@discussion
This will look up the asset in the asset registry and create the necessary objects to play the sound event
*/
@@ -62,89 +67,114 @@
assetIdentifier:(NSString*)assetIdentifier
error:(NSError**)error;
-/*! @method prepareWithCompletionHandler
+/*!
+ @method prepareWithCompletionBlock
@abstract Prepare the sound event
- @param completionHandler
- The block that will be called when the PHASESoundEvent has finished preparing and is ready to start. Pass in nil for no handler.
+ @param completionBlock
+ The block that will be called when the PHASESoundEvent has finished preparing and is ready to start. Pass in nil for no handler.
@discussion
- This will only prepare the sound event and get it ready to be played by the startWithCompletionHandler() function.
- If startWithCompletionHandler is called before it is done preparing, the sound event will start as soon as it is done preparing.
+ This function notifies the engine to begin preparing a sound event, then returns immediately.
+ Once the sound event is prepared (or has failed to prepare), you will receive a callback via the completionBlock.
+ If you call startWithCompletionBlock() before receiving the callback, the sound event will start as soon as it's prepared.
*/
-- (void)prepareWithCompletionHandler:(void (^)(PHASESoundEventPrepareHandlerReason reason, NSError* _Nullable error))completionHandler;
+- (void)prepareWithCompletionBlock:(void (^)(PHASESoundEventPrepareHandlerReason reason))completionBlock;
-/*! @method prepareAndReturnError
+/*!
+ @method prepareAndReturnError
@abstract Prepare the sound event
@discussion
- This will only prepare the sound event and get it ready to be played by the startWithCompletionHandler() function.
- If startWithCompletionHandler is called before it is done preparing, the sound event will start as soon as it is done preparing.
+ This function notifies the engine to begin preparing a sound event, then returns immediately.
+ If an error occurs while kicking off the work, the function will return false and optionally fill out error.
*/
- (BOOL)prepareAndReturnError:(NSError* _Nullable *)error;
-/*! @method startWithCompletionHandler
+/*!
+ @method startWithCompletionBlock
@abstract Start the sound event
- @param completionHandler
- The block that will be called when sound event have stopped.
+ @param completionBlock
+ The block that will be called when the sound event has stopped.
@discussion
- This will start the sound event's execution and sound playback, if applicable.
- Playback will begin immediately if the sound event has been prepared, otherwise it will start as soon as it is finished preparing.
+ 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 completionBlock.
+ Playback will begin immediately if the sound event has been prepared; otherwise, it will start as soon as it is finished preparing.
*/
-- (BOOL)startWithCompletionHandler:(void (^)(PHASESoundEventStartHandlerReason reason, NSError* _Nullable error))completionHandler;
+- (BOOL)startWithCompletionBlock:(void (^)(PHASESoundEventStartHandlerReason reason))completionBlock;
-/*! @method startAndReturnError
- @abstract start the sound event.
-*/
-- (BOOL)startAndReturnError:(NSError* _Nullable *)error;
-
-/*! @method seekToTime:completionHandler
- @abstract Seeks all leaf nodes in a PHASESoundEvent to a specified time relative to the start of the sound event.
+/*!
+ @method startAndReturnError
+ @abstract Start the sound event
@discussion
- If any leaf nodes do not support seeking, those nodes will ignore the command. Nodes that have finished playing or have stopped
- will not seek. Nodes that are sleeping will seek, and will resume at the correct time when they are awoken.
- @note The time is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
+ This function notifies the engine to start the sound event, then returns immediately.
+ If an error occurs while kicking off the work, the function will return false and optionally fill out error.
+ Playback will begin immediately if the sound event has been prepared; otherwise, it will start as soon as it is finished preparing.
*/
-- (BOOL)seekToTime:(double)time completionHandler:(nullable void (^)(PHASESoundEventSeekHandlerReason reason, NSError* _Nullable error))completionHandler;
+- (BOOL)startAndReturnError:(NSError* _Nullable *)error;
-/*! @method pause
- @abstract pause the sound event.
+/*!
+ @method seekToTime:completionBlock
+ @abstract Seeks all leaf nodes in a PHASESoundEvent to a specified time relative to the start of the sound event.
+ @discussion
+ This function notifies the engine to seek the sound event, then returns immediately.
+ Once the sound event has seeked to the new offset (or has failed to seek), you will receive a callback via the completionBlock.
+ 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.
+ Nodes that are sleeping will seek, and will resume at the correct time when they wake up.
+ @note
+ The time is scaled by unitsPerSecond internally, so can be provided at the client's native time scale.
+*/
+- (BOOL)seekToTime:(double)time completionBlock:(nullable void (^)(PHASESoundEventSeekHandlerReason reason))completionBlock
+NS_SWIFT_NAME(seek(time:completionBlock:));
+
+/*!
+ @method pause
+ @abstract Pause the sound event.
*/
- (void)pause;
-/*! @method resume
- @abstract resume a paused sound event.
+/*!
+ @method resume
+ @abstract Resume the sound event.
*/
- (void)resume;
-/*! @method stopAndInvalidate
+/*!
+ @method stopAndInvalidate
@abstract stop and invalidate the sound event
*/
- (void)stopAndInvalidate;
-/*! @property renderingState
+/*!
+ @property renderingState
@abstract Sound Event's current rendering state
*/
@property(readonly) PHASERenderingState renderingState;
-/*! @property prepareState
+/*!
+ @property prepareState
@abstract Sound Event's current preparation state
*/
@property(readonly) PHASESoundEventPrepareState prepareState;
-/*! @property metaParameters
+/*!
+ @property metaParameters
@abstract A Dictionary containing the MetaParameters associated with this sound event
*/
@property(readonly, copy) NSDictionary<NSString*, PHASEMetaParameter*>* metaParameters;
-/*! @property mixNodes
+/*!
+ @property mixNodes
@abstract A Dictionary containing the mix nodes associated with this sound event
*/
@property(readonly, copy) NSDictionary<NSString*, PHASEMixer*>* mixers;
-/*! @property pushStreamNodes
+/*!
+ @property pushStreamNodes
@abstract A Dictionary containing the push stream nodes associated with this sound event, for pushing buffers to.
*/
@property(readonly, copy) NSDictionary<NSString*, PHASEPushStreamNode*>* pushStreamNodes;
-/*! @property indefinite
+/*!
+ @property indefinite
@abstract A boolean that tell if this sound event will run indefinitely, or finish executing on its own
*/
@property(readonly, getter=isIndefinite) BOOL indefinite;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEventNodes.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEventNodes.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEventNodes.h 2021-06-02 12:48:06.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESoundEventNodes.h 2021-06-17 03:44:26.000000000 -0400
@@ -8,9 +8,9 @@
#ifndef PHASESoundEventNodes_h
#define PHASESoundEventNodes_h
-#import <AVFoundation/AVAudioBuffer.h>
-#import <AVFoundation/AVAudioFormat.h>
-#import <AVFoundation/AVAudioTime.h>
+#import <AVFAudio/AVAudioBuffer.h>
+#import <AVFAudio/AVAudioFormat.h>
+#import <AVFAudio/AVAudioTime.h>
#import <PHASE/PHASEEnvelope.h>
#import <PHASE/PHASEMetaParameter.h>
#import <PHASE/PHASEMixer.h>
@@ -26,16 +26,15 @@
/****************************************************************************************************/
/*!
@enum PHASEPushStreamBufferOptions
- @abstract Options controlling buffer scheduling.
-
- @constant PHASEPushStreamBufferDefault
- The buffer plays following any previously scheduled buffer(s).
- @constant PHASEPushStreamBufferLoops
- The buffer loops indefinitely.
- @constant PHASEPushStreamBufferInterrupts
- The buffer interrupts any buffer already playing.
- @constant PHASEPushStreamBufferInterruptsAtLoop
- The buffer interrupts any buffer already playing, at its loop point.
+ @abstract Options controlling buffer scheduling.
+ @constant PHASEPushStreamBufferDefault
+ The buffer plays following any previously scheduled buffer(s).
+ @constant PHASEPushStreamBufferLoops
+ The buffer loops indefinitely.
+ @constant PHASEPushStreamBufferInterrupts
+ The buffer interrupts any buffer already playing.
+ @constant PHASEPushStreamBufferInterruptsAtLoop
+ The buffer interrupts any buffer already playing, at its loop point.
*/
typedef NS_OPTIONS(NSUInteger, PHASEPushStreamBufferOptions) {
PHASEPushStreamBufferDefault = 1UL << 0, // 0x01
@@ -48,12 +47,10 @@
/*!
@enum PHASEPushStreamCompletionCallbackType
- @abstract Specifies when the completion handler must be invoked.
-
- @constant PHASEPushStreamCompletionDataRendered
- The buffer data has been rendered by the player. This
- does not account for any signal processing latencies downstream of the player
- in the engine.
+ @abstract Specifies when the completion handler must be invoked.
+ @constant PHASEPushStreamCompletionDataRendered
+ The buffer data has been rendered by the player.
+ This does not account for any signal processing latencies downstream of the player in the engine.
*/
typedef NS_ENUM(NSInteger, PHASEPushStreamCompletionCallbackType) {
PHASEPushStreamCompletionDataRendered = 0,
@@ -62,8 +59,9 @@
#pragma mark - PHASESoundEventNodeDefinition
/****************************************************************************************************/
-/*! @interface PHASESoundEventNodeDefinition
- * @abstract The base class for a sound event node definition
+/*!
+ @interface PHASESoundEventNodeDefinition
+ @abstract The base class for a sound event node definition
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASESoundEventNodeDefinition : PHASEDefinition
@@ -71,7 +69,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @property children
+/*!
+ @property children
@abstract The sound event node definition children of this node definition.
*/
@property(readonly, copy) NSArray<PHASESoundEventNodeDefinition*>* children;
@@ -82,8 +81,9 @@
#pragma mark - PHASEGeneratorNodeDefinition
/****************************************************************************************************/
-/*! @interface PHASEGeneratorNodeDefinition
- * @abstract An object for defining a generator node when building a sound event.
+/*!
+ @interface PHASEGeneratorNodeDefinition
+ @abstract An object for defining a generator node when building a sound event.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEGeneratorNodeDefinition : PHASESoundEventNodeDefinition
@@ -91,7 +91,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method setCalibrationMode:level
+/*!
+ @method setCalibrationMode:level
@abstract Set the generator's calibration mode and level.
@param calibrationMode
The calibration mode.
@@ -100,52 +101,50 @@
@note
The level, including its underlying unit and range, are dependent on the calibration mode.
*/
-- (void)setCalibrationMode:(PHASECalibrationMode)calibrationMode level:(double)level;
+- (void)setCalibrationMode:(PHASECalibrationMode)calibrationMode level:(double)level
+NS_SWIFT_NAME(setCalibrationMode(calibrationMode:level:));
-/*! @property playbackMode
- @abstract The PHASEPlaybackMode enum that describes the playback behavior of this generator.
-*/
-@property(nonatomic) PHASEPlaybackMode playbackMode;
-
-/*! @property calibrationMode
+/*!
+ @property calibrationMode
@abstract The generator's calibration mode. The default value is PHASECalibrationModeNone.
*/
@property(readonly) PHASECalibrationMode calibrationMode;
-/*! @property level
+/*!
+ @property level
@abstract The generator's level. The default value is 1.
@note The level's underlying unit and range are dependent on the calibrationMode.
-
*/
@property(readonly) double level;
-/*! @property rate
+/*!
+ @property rate
@abstract Linear rate scalar.
- @note Values are clamped to the range [0.25, 4]. Default value is 1.
+ @note
+ Values are clamped to the range [0.25, 4]. Default value is 1.
*/
@property(nonatomic, assign) double rate;
-/*! @property cullOption
- @abstract The cullOption for the node.
-*/
- @property(nonatomic) PHASECullOption cullOption;
-
-/*! @property group
+/*!
+ @property group
@abstract The PHASEGroup object this generator should be associated with for gain and rate control.
*/
@property(nonatomic, nullable, weak) PHASEGroup* group;
-/*! @property gainMetaParameterDefinition
+/*!
+ @property gainMetaParameterDefinition
@abstract Optionally attach a metaparameter definition here to enable dynamic control of the gain during playback.
*/
@property(nonatomic, strong, nullable, readwrite) PHASENumberMetaParameterDefinition* gainMetaParameterDefinition;
-/*! @property rateMetaParameterDefinition
+/*!
+ @property rateMetaParameterDefinition
@abstract Optionally attach a metaparameter definition here to enable dynamic control of the rate during playback.
*/
@property(nonatomic, strong, nullable, readwrite) PHASENumberMetaParameterDefinition* rateMetaParameterDefinition;
-/*! @property mixerDefinition
+/*!
+ @property mixerDefinition
@abstract The readonly property that returns the PHASEMixerDefinition this generator was created with and assigned to.
*/
@property(nonatomic, strong, readonly) PHASEMixerDefinition* mixerDefinition;
@@ -155,8 +154,11 @@
#pragma mark - PHASESamplerNodeDefinition
/****************************************************************************************************/
-/*! @interface PHASESamplerNodeDefinition
- * @abstract An object for defining a sampler sound event node when building a sound event.
+/*!
+ @interface PHASESamplerNodeDefinition
+ @abstract An object for defining a sampler sound event node when building a sound event.
+ @discussion
+ Sampler nodes play back registered sound assets.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASESamplerNodeDefinition : PHASEGeneratorNodeDefinition
@@ -164,7 +166,7 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithSoundAssetIdentifier:mixerDefinition:uid
+/*! @method initWithSoundAssetIdentifier:mixerDefinition:identifier
@abstract Create a sampler node definition
@param soundAssetIdentifier
The identifier of the registered sound asset this sampler will play
@@ -194,32 +196,56 @@
*/
@property(nonatomic, strong, readonly) NSString* assetIdentifier;
+/*! @property cullOption
+ @abstract The cull option for the sampler.
+ @discussion
+ The default value is PHASECullOptionTerminate.
+*/
+ @property(nonatomic) PHASECullOption cullOption;
+
+/*! @property playbackMode
+ @abstract The playback mode for the sampler.
+ @discussion
+ If the playback mode is set to PHASEPlaybackModeOneShot, you need to make sure the the audio data in the registered sound asset associated with this sampler
+ begins and ends at zero crossings. Otherwise, you'll hear a click when beginning playback and / or ending playback.
+ If the playback mode is set to PHASEPlaybackModeLooping, you need to make sure the audio data in the registered sound asset associated with this sampler
+ loops smoothly from the end sample to the start sample. Please verify this during authoring. Failing to do so will result in audible clicks at loop boundaries.
+ The default value is PHASEPlaybackModeOneShot.
+*/
+@property(nonatomic) PHASEPlaybackMode playbackMode;
+
@end
#pragma mark - PHASEContainerNodeDefinition
/****************************************************************************************************/
-/*! @interface PHASEContainerNodeDefinition
- * @abstract An object for defining a container sound event node when building a sound event.
+/*!
+ @interface PHASEContainerNodeDefinition
+ @abstract An object for defining a container sound event node when building a sound event.
+ @discussion
+ A container node plays back all its children at once.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEContainerNodeDefinition : PHASESoundEventNodeDefinition
-/*! @method init
+/*!
+ @method init
@abstract Create a container node definition
@return
A new PHASEContainerNodeDefinition object
*/
- (instancetype)init;
-/*! @method new
+/*!
+ @method new
@abstract Create a container node definition
@return
A new PHASEContainerNodeDefinition object
*/
+ (instancetype)new;
-/*! @method initWithIdentifier
+/*!
+ @method initWithIdentifier
@abstract Create a container node definition
@param identifier
An optional custom identifier to give to this object
@@ -228,21 +254,25 @@
*/
- (instancetype)initWithIdentifier:(NSString*)identifier;
-/*! @method initWithSoundAssetUID:mixerDefinition
- @abstract Create a container node definition
+/*!
+ @method addSubtree
+ @abstract Add a subtree to this node
@param subtree
Add a subtree of PHASESoundEventNodeDefinition nodes beneath this node.
*/
-- (void)addSubtree:(PHASESoundEventNodeDefinition*)subtree;
+- (void)addSubtree:(PHASESoundEventNodeDefinition*)subtree
+NS_SWIFT_NAME(addSubtree(subtree:));
@end
#pragma mark - PHASEBlendNodeDefinition
/****************************************************************************************************/
-/*! @interface PHASEBlendNodeDefinition
- * @abstract An object for defining a blend sound event node when building a
- * sound event.
+/*!
+ @interface PHASEBlendNodeDefinition
+ @abstract An object for defining a blend sound event node when building a sound event.
+ @discussion
+ A blend node blends between its children based on a numeric parameter.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEBlendNodeDefinition : PHASESoundEventNodeDefinition
@@ -250,11 +280,11 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithBlendMetaParameterDefinition:uid
+/*!
+ @method initWithBlendMetaParameterDefinition:identifier
@abstract Create a blend node definition
@param blendMetaParameterDefinition
- A metaparameter definition that wil be used to control the parameter of
- the blend node at runtime.
+ A metaparameter definition that wil be used to control the parameter of the blend node at runtime.
@param identifier
An optional custom identifier to give to this object
@return
@@ -263,7 +293,8 @@
- (instancetype)initWithBlendMetaParameterDefinition:(PHASENumberMetaParameterDefinition *)blendMetaParameterDefinition
identifier:(NSString*)identifier;
-/*! @method initWithBlendMetaParameterDefinition
+/*!
+ @method initWithBlendMetaParameterDefinition
@abstract Create a blend node definition
@param blendMetaParameterDefinition
A metaparameter definition that wil be used to control the parameter of the blend node at runtime.
@@ -274,7 +305,8 @@
(PHASENumberMetaParameterDefinition *)blendMetaParameterDefinition
NS_DESIGNATED_INITIALIZER;
-/*! @method initDistanceBlendWithSpatialMixerDefinition:uid
+/*!
+ @method initDistanceBlendWithSpatialMixerDefinition:identifier
@abstract Create a blend node definition
@param spatialMixerDefinition
A PHASESpatialMixerDefinition that will bind the blend parameter to the distance between the source and listener.
@@ -285,10 +317,11 @@
*/
- (instancetype)initDistanceBlendWithSpatialMixerDefinition:(PHASESpatialMixerDefinition *)spatialMixerDefinition
identifier:(NSString*)identifier
- NS_SWIFT_NAME(init(spatialMixerDefinition:identifier:));
+NS_SWIFT_NAME(init(spatialMixerDefinition:identifier:));
-/*! @method initDistanceBlendWithSpatialMixerDefinition
+/*!
+ @method initDistanceBlendWithSpatialMixerDefinition
@abstract Create a blend node definition
@param spatialMixerDefinition
A PHASESpatialMixerDefinition that will bind the blend parameter to the distance between the source and listener.
@@ -297,23 +330,26 @@
*/
- (instancetype)initDistanceBlendWithSpatialMixerDefinition:
(PHASESpatialMixerDefinition *)spatialMixerDefinition
- NS_DESIGNATED_INITIALIZER
- NS_SWIFT_NAME(init(spatialMixerDefinition:));
+NS_DESIGNATED_INITIALIZER
+NS_SWIFT_NAME(init(spatialMixerDefinition:));
-/*! @property blendParameterDefinition
+/*!
+ @property blendParameterDefinition
@abstract The readonly property that returns the PHASENumberMetaParameterDefinition this blend node was created with and assigned to.
*/
@property(nonatomic, strong, readonly, nullable)
PHASENumberMetaParameterDefinition* blendParameterDefinition;
-/*! @property distanceSpatialMixerDefinition
+/*!
+ @property distanceSpatialMixerDefinition
@abstract The readonly property that returns the PHASESpatialMixerDefinition this blend node was created with and assigned to.
*/
@property(nonatomic, strong, readonly, nullable)
PHASESpatialMixerDefinition* spatialMixerDefinitionForDistance;
-/*! @method addRangeForInputValuesBelow:fullGainAtValue:fadeCurveType:subtree
+/*!
+ @method addRangeForInputValuesBelow:fullGainAtValue:fadeCurveType:subtree
@abstract Create a blend range that is active for all values below a given threshold.
@param value
The value for which the range will be active if the blend node's input value is below this threshold.
@@ -328,9 +364,10 @@
fullGainAtValue:(double)fullGainAtValue
fadeCurveType:(PHASECurveType)fadeCurveType
subtree:(PHASESoundEventNodeDefinition*)subtree
-NS_SWIFT_NAME(addRangeForInputValues(belowValue:fullGainAtValue:fadeCurveType:subtree:));
+NS_SWIFT_NAME(addRangeForInputValuesBelow(value:fullGainAtValue:fadeCurveType:subtree:));
-/*! @method addRangeForInputValuesBetween:highValue:fullGainAtLowValue:fullGainAtHighValue:lowFadeCurveType:highFadeCurveType:subtree
+/*!
+ @method addRangeForInputValuesBetween:highValue:fullGainAtLowValue:fullGainAtHighValue:lowFadeCurveType:highFadeCurveType:subtree
@abstract Create a blend range that is active for all input values between lowValue and highValue
@param lowValue
The lower bound for which this range is active.
@@ -354,9 +391,10 @@
lowFadeCurveType:(PHASECurveType)lowFadeCurveType
highFadeCurveType:(PHASECurveType)highFadeCurveType
subtree:(PHASESoundEventNodeDefinition*)subtree
-NS_SWIFT_NAME(addRangeForInputValues(betweenLowValue:highValue:fullGainAtLowValue:fullGainAtHighValue:lowFadeCurveType:highFadeCurveType:subTree:));
+NS_SWIFT_NAME(addRangeForInputValuesBetween(lowValue:highValue:fullGainAtLowValue:fullGainAtHighValue:lowFadeCurveType:highFadeCurveType:subtree:));
-/*! @method addRangeForInputValuesAbove:fullGainAtValue:fadeCurveType:subtree
+/*!
+ @method addRangeForInputValuesAbove:fullGainAtValue:fadeCurveType:subtree
@abstract Create a blend range that is active for all values above a given threshold.
@param value
The value for which the range will be active if the blend node's input value is above this threshold.
@@ -371,9 +409,10 @@
fullGainAtValue:(double)fullGainAtValue
fadeCurveType:(PHASECurveType)fadeCurveType
subtree:(PHASESoundEventNodeDefinition*)subtree
-NS_SWIFT_NAME(addRangeForInputValues(aboveValue:fullGainAtValue:fadeCurveType:subTree:));
+NS_SWIFT_NAME(addRangeForInputValuesAbove(value:fullGainAtValue:fadeCurveType:subtree:));
-/*! @method addRangeWithEnvelope:subtree
+/*!
+ @method addRangeWithEnvelope:subtree
@abstract Create a blend range defined by a PHASEEnvelope object.
@param envelope
The PHASEEnvelope object that defines the output gain for a range.
@@ -389,8 +428,11 @@
#pragma mark - PHASESwitchNodeDefinition
/****************************************************************************************************/
-/*! @interface PHASESwitchNodeDefinition
- * @abstract An object for defining a switch sound event node when building a sound event.
+/*!
+ @interface PHASESwitchNodeDefinition
+ @abstract An object for defining a switch sound event node when building a sound event.
+ @discussion
+ A switch node switches between its children based on a string parameter.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASESwitchNodeDefinition : PHASESoundEventNodeDefinition
@@ -398,7 +440,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithSwitchMetaParameterDefinition:uid
+/*!
+ @method initWithSwitchMetaParameterDefinition:identifier
@abstract Create a switch node definition
@param switchMetaParameterDefinition
A metaparameter definition that wil be used to control the parameter of the switch node at runtime.
@@ -408,9 +451,11 @@
A new PHASESwitchNodeDefinition object
*/
- (instancetype)initWithSwitchMetaParameterDefinition:(PHASEStringMetaParameterDefinition*)switchMetaParameterDefinition
- identifier:(NSString*)identifier NS_SWIFT_NAME(init(switchMetaParameterDefinition:identifier:));
+ identifier:(NSString*)identifier
+NS_SWIFT_NAME(init(switchMetaParameterDefinition:identifier:));
-/*! @method initWithSwitchMetaParameterDefinition
+/*!
+ @method initWithSwitchMetaParameterDefinition
@abstract Create a switch node definition
@param switchMetaParameterDefinition
A metaparameter definition that wil be used to control the parameter of the switch node at runtime.
@@ -418,18 +463,21 @@
A new PHASESwitchNodeDefinition object
*/
- (instancetype)initWithSwitchMetaParameterDefinition:(PHASEStringMetaParameterDefinition*)switchMetaParameterDefinition
- NS_SWIFT_NAME(init(switchMetaParameterDefinition:))NS_DESIGNATED_INITIALIZER;
+NS_SWIFT_NAME(init(switchMetaParameterDefinition:))NS_DESIGNATED_INITIALIZER;
-/*! @method addSubtree
+/*!
+ @method addSubtree
@abstract Add a subtree to a switch node
- @param subTree
+ @param subtree
A PHASESoundEventNodeDefinition that will be a child node of this switch node
@param switchValue
A string value that the metaparameter will use to activate this subtree
*/
-- (void)addSubtree:(PHASESoundEventNodeDefinition*)subtree switchValue:(NSString*)switchValue;
+- (void)addSubtree:(PHASESoundEventNodeDefinition*)subtree switchValue:(NSString*)switchValue
+NS_SWIFT_NAME(addSubtree(subtree:switchValue:));
-/*! @property mixerDefinition
+/*!
+ @property mixerDefinition
@abstract The readonly property that returns the PHASEMixerDefinition this sampler was created with and assigned to.
*/
@property(nonatomic, strong, readonly) PHASEStringMetaParameterDefinition* switchMetaParameterDefinition;
@@ -440,20 +488,25 @@
#pragma mark - PHASERandomNodeDefinition
/****************************************************************************************************/
-/*! @interface PHASERandomNodeDefinition
- * @abstract An object for defining a random sound event node when building a sound event.
+/*!
+ @interface PHASERandomNodeDefinition
+ @abstract An object for defining a random sound event node when building a sound event.
+ @discussion
+ A random node selects one of its children based on a weighted random choice.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASERandomNodeDefinition : PHASESoundEventNodeDefinition
-/*! @method init
+/*!
+ @method init
@abstract Create a random node definition
@return
A new PHASERandomNodeDefinition object
*/
- (instancetype)init NS_DESIGNATED_INITIALIZER;
-/*! @method initWithIdentifier
+/*!
+ @method initWithIdentifier
@abstract Create a random node definition
@param identifier
An optional custom identifier to give to this object
@@ -462,7 +515,8 @@
*/
- (instancetype)initWithIdentifier:(NSString*)identifier;
-/*! @method addSubtree
+/*!
+ @method addSubtree
@abstract Add a subtree to a random node
@param subtree
A PHASESoundEventNodeDefinition that will be a child node of this random node
@@ -470,20 +524,22 @@
The probability weight of this subtree. Higher numbers compared to other subtree weights will increase the likelihood of being
chosen.
*/
-- (void)addSubtree:(PHASESoundEventNodeDefinition*)subtree weight:(NSNumber*)weight;
+- (void)addSubtree:(PHASESoundEventNodeDefinition*)subtree weight:(NSNumber*)weight
+NS_SWIFT_NAME(addSubtree(subtree:weight:));
-/*! @property noRepeatLastX
- @abstract Subtrees will not be repeated after they've been played for this many times this random node is activated.
+/*! @property uniqueSelectionQueueLength
+ @abstract Subtrees will not be repeated until after this random node is activated uniqueSelectionQueueLength number of times.
*/
-@property(nonatomic) NSInteger noRepeatLastX;
+@property(nonatomic) NSInteger uniqueSelectionQueueLength;
@end
#pragma mark - PHASEPushStreamNodeDefinition
/****************************************************************************************************/
-/*! @interface PHASEPushStreamNodeDefinition
- * @abstract An object for defining a push stream sound event node when building a sound event.
+/*!
+ @interface PHASEPushStreamNodeDefinition
+ @abstract An object for defining a push stream sound event node when building a sound event.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEPushStreamNodeDefinition : PHASEGeneratorNodeDefinition
@@ -491,7 +547,8 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithMixerDefinition:format:uid
+/*!
+ @method initWithMixerDefinition:format:identifier
@abstract Create a push stream node definition
@param mixerDefinition
The mixer definition this stream will be assigned to
@@ -504,7 +561,8 @@
*/
- (instancetype)initWithMixerDefinition:(PHASEMixerDefinition*)mixerDefinition format:(AVAudioFormat*)format identifier:(NSString*)identifier;
-/*! @method initWithMixerDefinition:format
+/*!
+ @method initWithMixerDefinition:format
@abstract Create a push stream node definition
@param mixerDefinition
The mixer definition this stream will be assigned to
@@ -515,12 +573,14 @@
*/
- (instancetype)initWithMixerDefinition:(PHASEMixerDefinition*)mixerDefinition format:(AVAudioFormat*)format NS_DESIGNATED_INITIALIZER;
-/*! @property format
+/*!
+ @property format
@abstract The readonly property that returns the AVAudioFormat that this stream was initialized with
*/
@property(nonatomic, strong, readonly) AVAudioFormat* format;
-/*! @property normalize
+/*!
+ @property normalize
@abstract Determines whether or not the engine should normalize the stream. The default value is NO.
@discussion
In general, client's are advised to normalize the input. Normalization is required to properly calibrate the output level.
@@ -533,8 +593,9 @@
#pragma mark - PHASEPushStreamNode
/****************************************************************************************************/
-/*! @interface PHASEPushStreamNode
- * @abstract An object for addessing an instance of a stream in an executing sound event
+/*!
+ @interface PHASEPushStreamNode
+ @abstract An object for addessing an instance of a stream in an executing sound event
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASEPushStreamNode : NSObject
@@ -542,87 +603,98 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @property gainMetaParameter
+/*!
+ @property gainMetaParameter
@abstract If specified during construction, the metaparameter for controlling gain will be available here
*/
@property(nonatomic, strong, nullable, readonly) PHASENumberMetaParameter* gainMetaParameter;
-/*! @property rateMetaParameter
+/*!
+ @property rateMetaParameter
@abstract If specified during construction, the metaparameter for controlling rate/pitch will be available here
*/
@property(nonatomic, strong, nullable, readonly) PHASENumberMetaParameter* rateMetaParameter;
-/*! @property mixer
+/*!
+ @property mixer
@abstract The readonly property that returns the PHASEMixer this sampler was created with and assigned to.
*/
@property(nonatomic, strong, readonly) PHASEMixer* mixer;
-/*! @property format
+/*!
+ @property format
@abstract The readonly property that returns the AVAudioFormat that this stream was initialized with.
*/
@property(nonatomic, strong, readonly) AVAudioFormat* format;
-/*! @method scheduleBuffer
+/*!
+ @method scheduleBuffer
@abstract Schedule a buffer for playback.
@param buffer
The buffer with PCM audio data.
@discussion
Schedules the buffer to be played following any previously scheduled buffer(s).
- Buffer format must be same as format specified during player instantiation
+ The buffer format must be same as format specified during player instantiation
*/
-- (void)scheduleBuffer:(AVAudioPCMBuffer*)buffer;
+- (void)scheduleBuffer:(AVAudioPCMBuffer*)buffer
+NS_SWIFT_NAME(scheduleBuffer(buffer:));
-/*! @method scheduleBuffer:completionCallbackType:completionHandler:
+/*!
+ @method scheduleBuffer:completionCallbackType:completionHandler:
@abstract Schedule a buffer for playback.
+ @discussion
+ Schedules the buffer to be played following any previously scheduled buffer(s).
+ The buffer format must be same as format specified during player instantiation
@param buffer
The buffer with PCM audio data.
@param completionCallbackType
- option to specify when the completion handler must be called.
+ Option to specify when the completion handler must be called.
@param completionHandler
- The completionHandler to be called as per the callback type specified or when
- the player is stopped, at which point the buffer can be recycled.
- @discussion
- Schedules the buffer to be played following any previously scheduled buffer(s).
- Buffer format must be same as format specified during player instantiation
+ The completionHandler to be called as per the specified completion callback type
+ or when the player is stopped, at which point the buffer can be recycled.
*/
- (void)scheduleBuffer:(AVAudioPCMBuffer*)buffer
completionCallbackType:(PHASEPushStreamCompletionCallbackType)completionCallbackType
- completionHandler:(void (^)(PHASEPushStreamCompletionCallbackType callbackType))completionHandler;
+ completionHandler:(void (^)(PHASEPushStreamCompletionCallbackType callbackType))completionHandler
+NS_SWIFT_NAME(scheduleBuffer(buffer:completionCallbackType:completionHandler:));
/*! @method scheduleBuffer:atTime:options:
@abstract Schedule a buffer for playback at a given time.
+ @discussion
+ The buffer format must be same as format specified during player instantiation
@param buffer
The buffer with PCM audio data.
@param when
The time at which to play the buffer. see the discussion of timestamps, above.
@param options
- options for looping, interrupting other buffers, etc.
- @discussion
- Buffer format must be same as format specified during player instantiation
+ Options for looping, interrupting other buffers, etc.
*/
-- (void)scheduleBuffer:(AVAudioPCMBuffer*)buffer atTime:(nullable AVAudioTime*)when options:(PHASEPushStreamBufferOptions)options;
+- (void)scheduleBuffer:(AVAudioPCMBuffer*)buffer atTime:(nullable AVAudioTime*)when options:(PHASEPushStreamBufferOptions)options
+NS_SWIFT_NAME(scheduleBuffer(buffer:time:options:));
-/*! @method scheduleBuffer:atTime:options:completionCallbackType:completionHandler:
+/*!
+ @method scheduleBuffer:atTime:options:completionCallbackType:completionHandler:
@abstract Schedule a buffer for playback at a given time.
+ @discussion
+ The buffer format must be same as format specified during player instantiation
@param buffer
The buffer with PCM audio data.
@param when
The time at which to play the buffer. see the discussion of timestamps, above.
@param options
- options for looping, interrupting other buffers, etc.
+ Options for looping, interrupting other buffers, etc.
@param completionCallbackType
- option to specify when the completion handler must be called.
+ Option to specify when the completion handler must be called.
@param completionHandler
The completionHandler to be called as per the callback type specified or when
the player is stopped, at which point the buffer can be recycled.
- @discussion
- Buffer format must be same as format specified during player instantiation
*/
- (void)scheduleBuffer:(AVAudioPCMBuffer*)buffer
atTime:(nullable AVAudioTime*)when
options:(PHASEPushStreamBufferOptions)options
completionCallbackType:(PHASEPushStreamCompletionCallbackType)completionCallbackType
- completionHandler:(void (^)(PHASEPushStreamCompletionCallbackType callbackType))completionHandler;
+ completionHandler:(void (^)(PHASEPushStreamCompletionCallbackType callbackType))completionHandler
+NS_SWIFT_NAME(scheduleBuffer(buffer:time:options:completionCallbackType:completionHandler:));
@end
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESource.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESource.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESource.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESource.h 2021-06-22 17:37:47.000000000 -0400
@@ -17,8 +17,13 @@
NS_ASSUME_NONNULL_BEGIN
/****************************************************************************************************/
-/*! @class PHASESource
- @abstract A PHASESource represents a sound source as PHASEShape(s)
+/*!
+ @class PHASESource
+ @abstract A PHASESource represents where sound originates within the simulated acoustic scene.
+ @discussion
+ PHASE supports both point sources and volumetric sources.
+ A point source simulates the sound from a point in space.
+ A volumetric source simulates the sound from a shape.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASESource : PHASEObject
@@ -26,13 +31,15 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithEngine:
+/*!
+ @method initWithEngine:
@abstract Initialize a new point source.
*/
- (instancetype)initWithEngine:(PHASEEngine*)engine NS_DESIGNATED_INITIALIZER;
-/*! @method initWithEngine:shapes:
- @abstract Initialize a new source with shapes.
+/*!
+ @method initWithEngine:shapes:
+ @abstract Initialize a new volumetric source with shapes.
@param shapes
The shape(s) of the source within the world
@discussion
@@ -40,13 +47,16 @@
*/
- (instancetype)initWithEngine:(PHASEEngine*)engine shapes:(NSArray<PHASEShape*>*)shapes NS_DESIGNATED_INITIALIZER;
-/*! @property gain
+/*!
+ @property gain
@abstract Linear gain scalar.
- @note Values are clamped to the range [0, 1]. Default value is 1.
+ @note
+ Values are clamped to the range [0, 1]. Default value is 1.
*/
@property(nonatomic, assign) double gain;
-/*! @property shapes
+/*!
+ @property shapes
@abstract Array of shapes associated with this source.
*/
@property(nonatomic, readonly, copy) NSArray<PHASEShape*>* shapes;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESpatialPipeline.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESpatialPipeline.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESpatialPipeline.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASESpatialPipeline.h 2021-06-22 17:37:46.000000000 -0400
@@ -17,17 +17,17 @@
typedef NSString* PHASESpatialCategory NS_TYPED_ENUM;
/*!
- @constant PHASESpatialCategoryDirectPathTransmission
+ @constant PHASESpatialCategoryDirectPathTransmission
*/
OS_EXPORT PHASESpatialCategory const PHASESpatialCategoryDirectPathTransmission;
/*!
- @constant PHASEEarlyReflections
+ @constant PHASEEarlyReflections
*/
OS_EXPORT PHASESpatialCategory const PHASESpatialCategoryEarlyReflections;
/*!
- @constant PHASELateReverb
+ @constant PHASELateReverb
*/
OS_EXPORT PHASESpatialCategory const PHASESpatialCategoryLateReverb;
@@ -36,14 +36,13 @@
/****************************************************************************************************/
/*!
@enum PHASESpatialPipelineOptions
- @abstract Spatial Pipeline Options.
-
- @constant PHASESpatialPipelineOptionDirectPathTransmission
- Direct Path Transmission.
- @constant PHASESpatialPipelineOptionEarlyReflections
- Early Reflections.
- @constant PHASESpatialPipelineOptionLateReverb
- Late Reverb.
+ @abstract Spatial pipeline options.
+ @constant PHASESpatialPipelineOptionDirectPathTransmission
+ Direct Path Transmission.
+ @constant PHASESpatialPipelineOptionEarlyReflections
+ Early Reflections.
+ @constant PHASESpatialPipelineOptionLateReverb
+ Late Reverb.
*/
typedef NS_OPTIONS(NSUInteger, PHASESpatialPipelineOptions) {
PHASESpatialPipelineOptionDirectPathTransmission = 1UL << 0,
@@ -57,19 +56,23 @@
@class PHASENumberMetaParameterDefinition;
/****************************************************************************************************/
-/*! @class PHASESpatialPipelineEntry
+/*!
+ @class PHASESpatialPipelineEntry
@abstract Spatial Pipeline Entry.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@interface PHASESpatialPipelineEntry : NSObject
-/*! @property sendLevel
+/*!
+ @property sendLevel
@abstract Send level.
- @note Values are clamped to the range [0, 1]. Default value is 1.
+ @note
+ Values are clamped to the range [0, 1]. Default value is 1.
*/
@property(nonatomic) double sendLevel;
-/*! @property sendLevelMetaParameterDefinition
+/*!
+ @property sendLevelMetaParameterDefinition
@abstract An optional metaparameter used to drive the send level during playback.
*/
@property(nonatomic, strong, nullable) PHASENumberMetaParameterDefinition* sendLevelMetaParameterDefinition;
@@ -79,7 +82,8 @@
#pragma mark - PHASESpatialPipeline
/****************************************************************************************************/
-/*! @class PHASESpatialPipeline
+/*!
+ @class PHASESpatialPipeline
@abstract Spatial Pipeline.
*/
OS_EXPORT API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos)
@@ -88,23 +92,27 @@
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
-/*! @method initWithOptions
+/*!
+ @method initWithOptions
@abstract Initialize a Spatial Pipeline with the provided options.
+ @discussion
+ It's invalid to pass options == 0 to this function. Doing so will return nil.
@param options
Options for direct path transmission, early reflections, late reverb, etc.
- @discussion It's invalid to pass options == 0 to this function. Doing so will return nil.
*/
- (nullable instancetype)initWithOptions:(PHASESpatialPipelineOptions)options NS_DESIGNATED_INITIALIZER;
-/*! @property options
+/*!
+ @property options
@abstract Spatial Pipeline Options.
*/
@property(nonatomic, readonly) PHASESpatialPipelineOptions options;
-/*! @property entries
+/*!
+ @property entries
@abstract A dictionary of entries in the Spatial Pipeline.
- @discussion Upon initialization, an entry will be created for every option in the PHASESpatialPipelineOptions options passed to
- PHASESpatialPipeline:initWithOptions.
+ @discussion
+ Upon initialization, an entry will be created for every option in the PHASESpatialPipelineOptions options passed to PHASESpatialPipeline:initWithOptions.
*/
@property(readonly, copy) NSDictionary<PHASESpatialCategory, PHASESpatialPipelineEntry*>* entries;
diff -ruN /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASETypes.h /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASETypes.h
--- /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASETypes.h 2021-06-02 12:48:07.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/PHASE.framework/Headers/PHASETypes.h 2021-06-16 03:25:24.000000000 -0400
@@ -10,20 +10,43 @@
#import <Foundation/Foundation.h>
-/*! @enum PHASEUpdateMode
+/*!
+ @enum PHASEUpdateMode
@abstract Update mode for the engine.
@discussion
- PHASEUpdateModeAutomatic - The system will update itself automatically. No need to call any functions to keep the engine going.
- PHASEUpdateModeManual - The user will need to call [PHASEEngine update] periodically to process new commands and updates.
+ The engine update mode determines the rate at which the engine consumes client commands, performs internal updates, and calls any registered handlers.
+ All API calls to the engine are queued until the engine updates.
+ The engine update mode determines if the engine or the application triggers the consumption of API commands.
+ @note
+ The update mode does not affect the Audio IO Thread or rendering, in general. The Audio IO Thread always runs in the background, independent of the update mode.
+ @constant PHASEUpdateModeAutomatic
+ The engine will internally consume client commands at a rate opaque to the client.
+ In general, automatic update mode is meant for simpler applications that just want to play sounds, without having to maintain a strict update loop.
+ Due to the fact that the engine consumes client commands at its own internal rate, the client is never guaranteed that two independent commands will synchronize.
+ @constant PHASEUpdateModeManual
+ When an application requires precise synchronization of API calls with the main update, manual mode is the best choice.
+ In this mode, clients will need to call [PHASEEngine update] periodically to process new commands, perform internal updates, and receive callbacks.
+ The rate at which the client calls update should at least match the rate at which other time-critical subsystems are updated, such graphics rendering etc.
+ API calls between calls to [PHASEEngine update] are guaranteed to be synchronized.
+ For example, the client can move two sources into place, request to start two sound events (one per source), then call [PHASEEngine update].
+ These calls will be guaranteed to be processed at the same time.
*/
+
typedef NS_ENUM(NSInteger, PHASEUpdateMode) {
PHASEUpdateModeAutomatic = 0,
PHASEUpdateModeManual = 1,
}
NS_SWIFT_NAME(PHASEEngine.UpdateMode);
-/*! @enum PHASERenderingState
- @abstract Rendering state of players and sound events
+/*!
+ @enum PHASERenderingState
+ @abstract Rendering state for sound events.
+ @constant PHASERenderingStateStopped
+ The sound event is stopped.
+ @constant PHASERenderingStateStarted
+ The sound event is playing back.
+ @constant PHASERenderingStatePaused
+ The sound event is paused.
*/
typedef NS_ENUM(NSInteger, PHASERenderingState) {
PHASERenderingStateStopped = 0,
@@ -32,79 +55,67 @@
}
NS_SWIFT_NAME(PHASESoundEvent.RenderingState);
-/*! @enum PHASESpatializationMode
- @abstract Setting for the engine's spatializer (e.g. Binaural, Channel-based, etc.)
+/*!
+ @enum PHASESpatializationMode
+ @abstract Spatialization mode.
+ @constant PHASESpatializationModeAutomatic
+ Automatically select the spatialization mode based on the current output device.
+ @constant PHASESpatializationModeAlwaysUseBinaural
+ Always use binaural rendering, whether playing back on headphones or speakers.
+ Note that when rendering binaural over speakers, special filters are applied to achieve the expected behavior.
+ @constant PHASESpatializationModeAlwaysUseChannelBased
+ Always use the appropriate channel-based panning algorithm for the output layout.
+ Note that when rendering channel-based over headphones, the sound will play back in stereo.
*/
typedef NS_ENUM(NSInteger, PHASESpatializationMode) {
PHASESpatializationModeAutomatic = 0,
- PHASESpatializationModeBinaural, /** Use binaural rendering, either for headphones or speakers. Note that when rendering binaural over speakers, special filters are applied to achieve the expected behavior. */
- PHASESpatializationModeChannelBased, /** Use the appropriate channel-based panning algorithm for the output layout. */
+ PHASESpatializationModeAlwaysUseBinaural = 1,
+ PHASESpatializationModeAlwaysUseChannelBased = 2,
};
-/*! @enum PHASEReverbPreset
- @abstract List of reverb presets
+/*!
+ @enum PHASEReverbPreset
+ @abstract Reverb preset
*/
typedef NS_ENUM(NSInteger, PHASEReverbPreset) {
- PHASEReverbPresetNone = 0,
- PHASEReverbPresetCathedral,
- PHASEReverbPresetLargeChamber,
- PHASEReverbPresetLargeHall,
- PHASEReverbPresetLargeRoom,
- PHASEReverbPresetLargeRoom2,
- PHASEReverbPresetLargeHall2,
- PHASEReverbPresetMediumChamber,
- PHASEReverbPresetMediumHall,
- PHASEReverbPresetMediumHall2,
- PHASEReverbPresetMediumHall3,
- PHASEReverbPresetMediumRoom,
- PHASEReverbPresetSmallRoom
+ PHASEReverbPresetNone = 'rNon',
+ PHASEReverbPresetSmallRoom = 'rSRm',
+ PHASEReverbPresetMediumRoom = 'rMRm',
+ PHASEReverbPresetLargeRoom = 'rLR1',
+ PHASEReverbPresetLargeRoom2 = 'rLR2',
+ PHASEReverbPresetMediumChamber = 'rMCh',
+ PHASEReverbPresetLargeChamber = 'rLCh',
+ PHASEReverbPresetMediumHall = 'rMH1',
+ PHASEReverbPresetMediumHall2 = 'rMH2',
+ PHASEReverbPresetMediumHall3 = 'rMH3',
+ PHASEReverbPresetLargeHall = 'rLH1',
+ PHASEReverbPresetLargeHall2 = 'rLH2',
+ PHASEReverbPresetCathedral = 'rCth',
};
/*!
- * @const PHASEErrorDomain
- * @abstract The NSErrorDomain for general PHASE errors
+ @const PHASEErrorDomain
+ @abstract The NSErrorDomain for general PHASE errors
*/
OS_EXPORT NSErrorDomain const PHASEErrorDomain;
/*!
- * @enum PHASEError
- * @abstract General PHASE error codes
+ @enum PHASEError
+ @abstract General PHASE error codes
*/
typedef NS_ERROR_ENUM(PHASEErrorDomain, PHASEError) {
PHASEErrorInitializeFailed = 'PHEa',
};
/*!
- * @const PHASEParseErrorDomain
- * @abstract The NSErrorDomain for PHASE parse errors
- */
-OS_EXPORT NSErrorDomain const PHASEParseErrorDomain;
-
-/*!
- * @enum PHASEParserError
- * @abstract Parser specific error codes
- */
-typedef NS_ERROR_ENUM(PHASEParseErrorDomain, PHASEParserError) {
- PHASEParserErrorParseError = 'PHpa',
- PHASEParserErrorMissingRequiredField = 'PHpb',
- PHASEParserErrorFieldWithWrongType = 'PHpc',
- PHASEParserErrorOutOfMemory = 'PHpd',
- PHASEParserErrorStringTooLong = 'PHpe',
- PHASEParserErrorInvalidValue = 'PHpf',
- PHASEParserErrorWrongVersion = 'PHpg',
- PHASEParserErrorBadData = 'PHph',
- PHASEParserErrorNotImplemented = 'PHpi',
-};
-
-/*!
- * @const PHASESoundEventErrorDomain
- * @abstract The NSErrorDomain for PHASE sound event errors
+ @const PHASESoundEventErrorDomain
+ @abstract The NSErrorDomain for PHASE sound event errors.
*/
OS_EXPORT NSErrorDomain const PHASESoundEventErrorDomain;
/*!
- * @enum PHASESoundEventError
- * @abstract Sound Event specific error codes
+ @enum PHASESoundEventError
+ @abstract Sound event error.
*/
typedef NS_ERROR_ENUM(PHASESoundEventErrorDomain, PHASESoundEventError) {
PHASESoundEventErrorNotFound = 'PHta',
@@ -116,34 +127,14 @@
};
/*!
- * @const PHASEExternalStreamErrorDomain
- * @abstract The NSErrorDomain for PHASE external stream errors
- */
-OS_EXPORT NSErrorDomain const PHASEExternalStreamErrorDomain;
-
-/*!
- * @enum PHASEExternalStreamError
- * @abstract External stream specific error codes
- */
-typedef NS_ERROR_ENUM(PHASEExternalStreamErrorDomain, PHASEExternalStreamError) {
- PHASEExternalStreamErrorNotAvailable = 'PHna',
- PHASEExternalStreamErrorInvalidArguments = 'PHia',
- PHASEExternalStreamErrorStreamAlreadyExists = 'PHse',
- PHASEExternalStreamErrorStreamDoesNotExist = 'PHns',
- PHASEExternalStreamErrorStreamAlreadyClaimed = 'PHcs',
- PHASEExternalStreamErrorStreamNotClaimed = 'PHus',
- PHASEExternalStreamErrorAllocationFailed = 'PHaf',
-};
-
-/*!
- * @const PHASEAssetErrorDomain
- * @abstract The NSErrorDomain for PHASE Asset errors
+ @const PHASEAssetErrorDomain
+ @abstract The NSErrorDomain for PHASE Asset errors
*/
OS_EXPORT NSErrorDomain const PHASEAssetErrorDomain;
/*!
- * @enum PHASEAssetError
- * @abstract Asset specific error codes
+ @enum PHASEAssetError
+ @abstract Asset error
*/
typedef NS_ERROR_ENUM(PHASEAssetErrorDomain, PHASEAssetError) {
PHASEAssetErrorFailedToLoad = 'PHaa',
@@ -154,22 +145,32 @@
PHASEAssetErrorMemoryAllocation = 'PHaf',
};
-typedef NS_ENUM(NSInteger, PHASESoundEventStartHandlerReason) {
- PHASESoundEventStartHandlerReasonError = 0,
- PHASESoundEventStartHandlerReasonFinishedPlaying = 1,
- PHASESoundEventStartHandlerReasonTerminated = 2,
- PHASESoundEventStartHandlerReasonKilled API_DEPRECATED_WITH_REPLACEMENT("PHASESoundEventStartHandlerReasonTerminated", macos(10.5, 10.5)) = PHASESoundEventStartHandlerReasonTerminated,
-}
-NS_SWIFT_NAME(PHASESoundEvent.StartHandlerReason);
-
+/*!
+ @enum PHASESoundEventPrepareHandlerReason
+ @abstract Sound event prepare handler reason
+ */
typedef NS_ENUM(NSInteger, PHASESoundEventPrepareHandlerReason) {
PHASESoundEventPrepareHandlerReasonError = 0,
PHASESoundEventPrepareHandlerReasonPrepared = 1,
PHASESoundEventPrepareHandlerReasonTerminated = 2,
- PHASESoundEventPrepareHandlerReasonKilled API_DEPRECATED_WITH_REPLACEMENT("PHASESoundEventPrepareHandlerReasonTerminated", macos(10.5, 10.5)) = PHASESoundEventPrepareHandlerReasonTerminated,
}
NS_SWIFT_NAME(PHASESoundEvent.PrepareHandlerReason);
+/*!
+ @enum PHASESoundEventStartHandlerReason
+ @abstract Sound event start handler reason
+ */
+typedef NS_ENUM(NSInteger, PHASESoundEventStartHandlerReason) {
+ PHASESoundEventStartHandlerReasonError = 0,
+ PHASESoundEventStartHandlerReasonFinishedPlaying = 1,
+ PHASESoundEventStartHandlerReasonTerminated = 2,
+}
+NS_SWIFT_NAME(PHASESoundEvent.StartHandlerReason);
+
+/*!
+ @enum PHASESoundEventSeekHandlerReason
+ @abstract Sound event seek handler reason
+ */
typedef NS_ENUM(NSInteger, PHASESoundEventSeekHandlerReason) {
PHASESoundEventSeekHandlerReasonError = 0,
PHASESoundEventSeekHandlerReasonErrorSeekAlreadyInProgress = 1,
@@ -177,6 +178,10 @@
}
NS_SWIFT_NAME(PHASESoundEvent.SeekHandlerReason);
+/*!
+ @enum PHASESoundEventPrepareState
+ @abstract Sound event prepare state
+ */
typedef NS_ENUM(NSInteger, PHASESoundEventPrepareState) {
PHASESoundEventPrepareStatePrepareNotStarted = 0,
PHASESoundEventPrepareStatePrepareInProgress = 1,
@@ -184,24 +189,19 @@
}
NS_SWIFT_NAME(PHASESoundEvent.PrepareState);
-typedef NS_ENUM(NSInteger, PHASEAssetUnregisterHandlerReason) {
- PHASEAssetUnregisterHandlerReasonError,
- PHASEAssetUnregisterHandlerReasonSuccess,
-}
-NS_SWIFT_NAME(PHASEAsset.UnregisterHandlerReason);
-
/*!
@enum PHASEAssetType
- @abstract Asset types.
- @discussion Determines how assets are loaded into memory and prepared for playback.
- 'Preparing' an asset for playback may include decompression and/or format conversion,
- depending on the type of the underlying asset data.
- @constant PHASEAssetTypeResident
- If the asset is on disk, it is loaded into memory and prepared for playback.
- If the asset is in memory, it is prepared for playback.
- @constant PHASEAssetTypeStreamed
- If the asset is on disk, it is streamed from disk into memory and prepared during playback.
- If the asset is in memory, it is streamed from memory and prepared during playback.
+ @abstract Asset types.
+ @discussion
+ Determines how assets are loaded into memory and prepared for playback.
+ 'Preparing' an asset for playback may include decompression and/or format conversion,
+ depending on the type of the underlying asset data.
+ @constant PHASEAssetTypeResident
+ If the asset is on disk, it is loaded into memory and prepared for playback.
+ If the asset is in memory, it is prepared for playback.
+ @constant PHASEAssetTypeStreamed
+ If the asset is on disk, it is streamed from disk into memory and prepared during playback.
+ If the asset is in memory, it is streamed from memory and prepared during playback.
*/
typedef NS_ENUM(NSInteger, PHASEAssetType) {
PHASEAssetTypeResident = 0,
@@ -209,142 +209,110 @@
}
NS_SWIFT_NAME(PHASEAsset.AssetType);
-/****************************************************************************************************/
-/*! @enum PHASECurveType
- * @abstract Enumeration for specifying interpolation curves for gain and other values.
- * @discussion
- * PHASECurveTypeLinear
- * A curve using a linear function
- *
- * PHASECurveTypeLog
- * A curve using a logarithmic function
- *
- * PHASECurveTypeExponential
- * A curve using an exponential (inverse logarithmic) function
- *
- * PHASECurveTypeRounded
- * A curve that starts exponential, but ends logarithmic.
- * (quick at the ends and slow in the middle)
- *
- * PHASECurveTypeSCurve
- * A curve that starts logarithmic, but ends exponential.
- * (slow at the ends and quick in the middle)
+/*!
+ @enum PHASECurveType
+ @abstract Curve types.
+ @constant PHASECurveTypeLinear
+ A curve of the form y = x.
+ @constant PHASECurveTypeSquared
+ A curve of the form y = x^2.
+ @constant PHASECurveTypeInverseSquared
+ A curve of the form y = 1 / x^2.
+ @constant PHASECurveTypeCubed
+ A curve of the form y = x^3.
+ @constant PHASECurveTypeInverseCubed
+ A curve of the form y = 1 / x^3.
+ @constant PHASECurveTypeSine
+ A sine curve.
+ @constant PHASECurveTypeInverseSine
+ An inverse sine curve.
+ @constant PHASECurveTypeSigmoid
+ A sigmoid curve.
+ Also known as an s-curve, slow at the ends and quick in the middle.
+ @constant PHASECurveTypeInverseSigmoid
+ An inverse sigmoid curve.
+ Also known as an inverse s-curve, quick at the ends and slow in the middle.
*/
typedef NS_ENUM(NSInteger, PHASECurveType) {
- PHASECurveTypeLinear,
- PHASECurveTypeSquared,
- PHASECurveTypeInverseSquared,
- PHASECurveTypeCubed,
- PHASECurveTypeInverseCubed,
- PHASECurveTypeSineReciprocal,
- PHASECurveTypeSine,
- PHASECurveTypeSigmoid,
- PHASECurveTypeInverseSigmoid
+ PHASECurveTypeLinear = 'crLn',
+ PHASECurveTypeSquared = 'crSq',
+ PHASECurveTypeInverseSquared = 'crIQ',
+ PHASECurveTypeCubed = 'crCu',
+ PHASECurveTypeInverseCubed = 'crIC',
+ PHASECurveTypeSine = 'crSn',
+ PHASECurveTypeInverseSine = 'crIS',
+ PHASECurveTypeSigmoid = 'crSg',
+ PHASECurveTypeInverseSigmoid = 'crIG',
};
-/****************************************************************************************************/
-/*! @enum PHASECullOption
- * @abstract Enumeration of various cull options.
- * @discussion
- * PHASECullOptionTerminate
- * If cullable, the sound will stop and not restart.
- *
- * PHASECullOptionSleepWakeAtZero
- * If cullable, put to sleep. Upon waking, restart at beginning of sound.
- *
- * PHASECullOptionSleepWakeAtRandomOffset
- * If cullable, put to sleep. Upon waking, start playback at random offset in sound.
- *
- * PHASECullOptionSleepWakeAtRealtimeOffset
- * If cullable, put to sleep. Upon waking, start playback at realtime offset in sound.
- *
- * PHASECullOptionDoNotCull
- * Never cull.
- */
+/*!
+ @enum PHASECullOption
+ @abstract Cull option.
+ @discussion Determines what the engine should do when a sound asset becomes cullable.
+ @constant PHASECullOptionTerminate
+ If cullable, the sound asset will stop. Note that this can occur before or during playback.
+ @constant PHASECullOptionSleepWakeAtZero
+ If cullable, the sound asset will be put to sleep. Upon waking, start playback at the beginning.
+ @constant PHASECullOptionSleepWakeAtRandomOffset
+ If cullable, the sound asset will be put to sleep. Upon waking, start playback at random offset.
+ @constant PHASECullOptionSleepWakeAtRealtimeOffset
+ If cullable, the sound asset will be put to sleep. Upon waking, start playback at realtime offset.
+ @constant PHASECullOptionDoNotCull
+ If cullable, continue playback, even if the sound is inaudible.
+*/
typedef NS_ENUM(NSInteger, PHASECullOption) {
- PHASECullOptionTerminate,
- PHASECullOptionSleepWakeAtZero,
- PHASECullOptionSleepWakeAtRandomOffset,
- PHASECullOptionSleepWakeAtRealtimeOffset,
- PHASECullOptionDoNotCull,
- PHASECullOptionKill API_DEPRECATED_WITH_REPLACEMENT("PHASECullOptionTerminate", macos(10.5, 10.5)) = PHASECullOptionTerminate,
+ PHASECullOptionTerminate = 0,
+ PHASECullOptionSleepWakeAtZero = 1,
+ PHASECullOptionSleepWakeAtRandomOffset = 2,
+ PHASECullOptionSleepWakeAtRealtimeOffset = 3,
+ PHASECullOptionDoNotCull = 4,
};
-/****************************************************************************************************/
-/*! @enum PHASEPlaybackMode
- * @abstract Enumeration of various playback types
- * @discussion
- * PHASEPlaybackModeOneShot
- * Play the sound asset once and stop.
- *
- * PHASEPlaybackModeLooping
- * Loop the sound asset indefinitely.
- *
- * PHASEPlaybackModeLoopingRandomStartOffset
- * Loop the audio buffer indefinitely, starting at a random offset.
- */
+/*!
+ @enum PHASEPlaybackMode
+ @abstract Playback mode.
+ @constant PHASEPlaybackModeOneShot
+ Play the sound asset once, then stop.
+ @constant PHASEPlaybackModeLooping
+ Loop the sound asset indefinitely.
+*/
typedef NS_ENUM(NSInteger, PHASEPlaybackMode) {
- PHASEPlaybackModeOneShot,
- PHASEPlaybackModeLooping,
- PHASEPlaybackModeLoopingRandomStartOffset,
+ PHASEPlaybackModeOneShot = 0,
+ PHASEPlaybackModeLooping = 1,
};
-/****************************************************************************************************/
-/*! @enum PHASEMixerType
- * @abstract Enumeration of various mixer types
- * @discussion
- * PHASEMixerTypeSpatial
- * Sound is spatialized using rotation and translation.
- *
- * PHASEMixerTypeAmbient
- * Sound is spatialized using rotation only.
- *
- * PHASEMixerTypeChannel
- * Sound is not spatialized.
- *
- */
-typedef NS_ENUM(NSInteger, PHASEMixerType) {
- PHASEMixerTypeUnknown = 0,
- PHASEMixerTypeSpatial,
- PHASEMixerTypeAmbient,
- PHASEMixerTypeChannel,
-}
-NS_SWIFT_NAME(PHASEMixer.MixerType);
-
-/****************************************************************************************************/
-/*! @enum PHASENormalizationMode
- * @abstract Normalization Mode
- * @note In general, client's are advised to normalize the input. Normalization is required to properly calibrate the output level.
- * @discussion
- * PHASENormalizationModeNone
- * No normalization is applied. In this case, it's advised that the client perform custom normalization.
- *
- * PHASENormalizationModeDynamic
- * Dynamic Normalization is applied.
+/*!
+ @enum PHASENormalizationMode
+ @abstract Normalization mode
+ @discussion Determines how sound assets are normalized for calibrated loudness on the output device.
+ @note In general, clients are advised to normalize sound assets (and streams).
+ This will make it easier to mix the content once assigned to a generator with a specified calbration mode and level.
+ @constant PHASENormalizationModeNone
+ No normalization is applied. In this case, it's advised that the client perform custom normalization.
+ @constant PHASENormalizationModeDynamic
+ Dynamic Normalization is applied.
*/
typedef NS_ENUM(NSInteger, PHASENormalizationMode) {
PHASENormalizationModeNone = 0,
PHASENormalizationModeDynamic = 1,
};
-/****************************************************************************************************/
-/*! @enum PHASECalibrationMode
- * @abstract Calibration Mode
- * @note In general, client's are advised use a calibrated input mode. Setting the value to PHASECalibrationModeNone is not advised.
- * @discussion
- * PHASECalibrationModeNone
- * Linear gain with no reference (uncalibrated).
- *
- * PHASECalibrationModeRelativeSpl
- * SPL relative to a device-tuned SPL (when available).
- *
- * PHASECalibrationModeAbsoluteSpl
- * Absolute SPL (the system will hit the value 'if it can').
- */
+/*!
+ @enum PHASECalibrationMode
+ @abstract Calibration mode.
+ @note In general, clients are advised use a calibrated input mode. Setting the value to PHASECalibrationModeNone is not advised.
+ @constant PHASECalibrationModeNone
+ Linear gain with no reference (uncailbrated).
+ @constant PHASECalibrationModeRelativeSpl
+ SPL relative to a device-tuned SPL (when available).
+ @constant PHASECalibrationModeAbsoluteSpl
+ Absolute SPL. The system will hit the value 'if it can' (depending on the capabilities of the current output device).
+*/
typedef NS_ENUM(NSInteger, PHASECalibrationMode) {
PHASECalibrationModeNone = 0,
PHASECalibrationModeRelativeSpl = 1,
- PHASECalibrationModeAbsoluteSpl = 2
+ PHASECalibrationModeAbsoluteSpl = 2,
};
#endif /* PHASETypes_h */
+
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status