Contents

AudioComponentInstanceGetComponent(_:)

Retrieves a reference to an audio component from an instance of that audio component.

Declaration

func AudioComponentInstanceGetComponent(_ inInstance: AudioComponentInstance) -> AudioComponent

Parameters

  • inInstance:

    The component instance whose corresponding factory object you want to get. Must not be NULL, and you must own the instance (specifically, you must not have previously called Audiocomponentinstancedispose(_:) on the instance).

Return Value

A reference to the desired audio component. If the value provided in the inInstance parameter is invalid, returns NULL.

Discussion

Use this function to retrieve a reference to the audio component that was used to instantiate a given audio component instance. You can then query the component for its attributes by calling the AudioComponentGetDescription(_:_:) function.

See Also

Creating an Audio Component Dynamically