Trait AUAudioUnitFactory

Source
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§

Source

unsafe fn createAudioUnitWithComponentDescription_error( &self, desc: AudioComponentDescription, ) -> Result<Retained<AUAudioUnit>, Retained<NSError>>
where Self: Sized + Message,

Available on crate features 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.

Trait Implementations§

Source§

impl ProtocolType for dyn AUAudioUnitFactory

Source§

const NAME: &'static str = "AUAudioUnitFactory"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn AUAudioUnitFactory

Implementations on Foreign Types§

Source§

impl<T> AUAudioUnitFactory for ProtocolObject<T>

Implementors§