pub unsafe trait AUAudioUnitFactory: NSExtensionRequestHandling {
// Provided method
unsafe fn createAudioUnitWithComponentDescription_error(
&self,
desc: AudioComponentDescription,
) -> Result<Retained<AUAudioUnit>, Retained<NSError>>
where Self: Sized + Message { ... }
}
Available on crate feature
AUAudioUnitImplementation
only.Expand description
Protocol to which principal classes of v3 audio units (extensions) must conform.
The principal class of a non-UI v3 audio unit extension will generally derive from NSObject and implement this protocol.
The principal class of a UI v3 audio unit extension must derive from AUViewController and implement this protocol.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn createAudioUnitWithComponentDescription_error(
&self,
desc: AudioComponentDescription,
) -> Result<Retained<AUAudioUnit>, Retained<NSError>>
Available on crate features AUAudioUnit
and AudioComponent
only.
unsafe fn createAudioUnitWithComponentDescription_error( &self, desc: AudioComponentDescription, ) -> Result<Retained<AUAudioUnit>, Retained<NSError>>
AUAudioUnit
and AudioComponent
only.Create an instance of an extension’s AUAudioUnit.
This method should create and return an instance of its audio unit.
This method will be called only once per instance of the factory.
Note that in non-ARC code, “create” methods return unretained objects (unlike “create” C functions); the implementor should return an object with reference count 1 but autoreleased.