Audio Component Services Reference
| Framework | AudioUnit/AudioUnit.h |
| Declared in | AudioComponent.h |
Overview
Audio Component Services defines interfaces for finding and opening audio units and audio codecs. It preserves binary compatibility with OS X v10.5 component interfaces while removing dependency on the Component Manager.
Functions
AudioComponentCopyName
Returns the generic name of an audio component.
OSStatus AudioComponentCopyName ( AudioComponent inComponent, CFStringRef *outName );
Parameters
- inComponent
The audio component that you want the generic name of.
- outName
On output, the generic name of the specified audio component.
Return Value
A result code.
Availability
- Available in iOS 2.0 and later.
Declared In
AudioComponent.hAudioComponentCount
Returns the number of audio components that match a specified AudioComponentDescription structure.
UInt32 AudioComponentCount ( AudioComponentDescription *inDesc );
Parameters
- inDesc
The description of the audio components you want to count.
Return Value
The number of matching components on the system.
Availability
- Available in iOS 2.0 and later.
Declared In
AudioComponent.hAudioComponentFindNext
Finds the next component that matches a specified AudioComponentDescription structure after a specified audio component.
AudioComponent AudioComponentFindNext ( AudioComponent inAComponent, AudioComponentDescription *inDesc );
Parameters
- inAComponent
The audio component that you want to start searching after.
- inDesc
The description of the audio component you want to find.
Return Value
An audio component.
Availability
- Available in iOS 2.0 and later.
Declared In
AudioComponent.hAudioComponentGetDescription
Gets the class description, as an AudioComponentDescription structure, of an audio component.
OSStatus AudioComponentGetDescription ( AudioComponent inComponent, AudioComponentDescription *outDesc );
Parameters
- inComponent
The audio component that you want a description of.
- outDesc
The description of the specified audio component.
Return Value
A result code.
Availability
- Available in iOS 2.0 and later.
Declared In
AudioComponent.hAudioComponentGetVersion
Gets the version of an audio component in hexadecimal form as 0xMMMMmmDD (major, minor, dot).
OSStatus AudioComponentGetVersion ( AudioComponent inComponent, UInt32 *outVersion );
Parameters
- inComponent
The audio component that you want the version of.
- outVersion
The version of the specified audio component.
Return Value
A result code.
Discussion
Availability
- Available in iOS 2.0 and later.
Declared In
AudioComponent.hAudioComponentInstanceCanDo
Determines if an audio component instance implements a particular function.
Boolean AudioComponentInstanceCanDo ( AudioComponentInstance inInstance, SInt16 inSelectorID );
Parameters
- inInstance
The audio component instance that you want to examine.
- inSelectorID
An audio component function selector. The available values for audio units are listed in
General Audio Unit Function SelectorsandI/O Audio Unit Function Selectors.
Availability
- Available in iOS 3.0 and later.
Declared In
AudioComponent.hAudioComponentInstanceDispose
Disposes of an audio component instance.
OSStatus AudioComponentInstanceDispose ( AudioComponentInstance inInstance );
Parameters
- inInstance
The audio component instance that you want to dispose of.
Return Value
A result code.
Availability
- Available in iOS 2.0 and later.
Declared In
AudioComponent.hAudioComponentInstanceGetComponent
Retrieves a reference to an audio component from an instance of that audio component.
AudioComponent AudioComponentInstanceGetComponent ( AudioComponentInstance inInstance );
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 calledAudioComponentInstanceDisposeon 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.
Availability
- Available in iOS 2.0 and later.
Declared In
AudioComponent.hAudioComponentInstanceNew
Creates a new instance of an audio component.
OSStatus AudioComponentInstanceNew ( AudioComponent inComponent, AudioComponentInstance *outInstance );
Parameters
- inComponent
The audio component that you want to create a new instance of.
- outInstance
On output, the new audio component instance.
Return Value
A result code.
Availability
- Available in iOS 2.0 and later.
Declared In
AudioComponent.hData Types
AudioComponent
An audio component.
typedef struct OpaqueAudioComponent *AudioComponent;
Availability
- Available in iOS 2.0 and later.
Declared In
AudioComponent.hAudioComponentInstance
A component instance, or object, is an audio unit or audio codec.
typedef struct OpaqueAudioComponentInstance *AudioComponentInstance;
Availability
- Available in iOS 2.0 and later.
Declared In
AudioComponent.hAudioComponentDescription
Identifying information for an audio component.
typedef struct AudioComponentDescription {
OSType componentType;
OSType componentSubType;
OSType componentManufacturer;
UInt32 componentFlags;
UInt32 componentFlagsMask;
} AudioComponentDescription;
Fields
componentTypeA unique 4-byte code identifying the interface for the component.
componentSubTypeA 4-byte code that you can use to indicate the purpose of a component. For example, you could use
lpasorlowpas a mnemonic indication that an audio unit is a low-pass filter.componentManufacturerThe unique vendor identifier, registered with Apple, for the audio component.
componentFlagsSet this value to zero.
componentFlagsMaskSet this value to zero.
Availability
- Available in iOS 2.0 and later.
Declared In
AudioComponent.h© 2011 Apple Inc. All Rights Reserved. (Last updated: 2011-03-14)