AUParamInfo() doesn't seem to exist in the iOS7 frameworks (CoreAudio, AudioUnit, AudioToolbox). I'm wondering what would be the way to get all parameters for a unit. That is, without knowing what type or subtype of unit it is, since if not the answer would be to look up in the Audio Unit Parameters Reference.
Greg's answer is right in the sense that kAudioUnitProperty_ParameterList is the right property ID to query to eventually get all parameters of a unit. However, the way to get all parameters is a bit more involved:
AudioUnitGetPropertyInfo
to see if the property is available and if it is, get back its data size (data size for the whole info which might be a collection, not for a single element of whatever type the property is, mind you).Use AudioUnitGetProperty
proper to get the property back. Also, at this point, if the property you got back is a collection of elements as opposed to a single one, you'll have to call AudioUnitGetProperty
once for each element. Specifically, you'll call it dataSize / sizeof(TypeToHoldSingleInstanceOfYourProperty)
times.
// Get number of parameters in this unit (size in bytes really):
UInt32 parameterListSize = 0;
AudioUnitGetPropertyInfo(_audioUnit, kAudioUnitProperty_ParameterList, kAudioUnitScope_Global, 0, ¶meterListSize, NULL);
// Get ids for the parameters:
AudioUnitParameterID *parameterIDs = malloc(parameterListSize);
AudioUnitGetProperty(_audioUnit, kAudioUnitProperty_ParameterList, kAudioUnitScope_Global, 0, parameterIDs, ¶meterListSize);
AudioUnitParameterInfo parameterInfo_t;
UInt32 parameterInfoSize = sizeof(AudioUnitParameterInfo);
UInt32 parametersCount = parameterListSize / sizeof(AudioUnitParameterID);
for(UInt32 pIndex = 0; pIndex < parametersCount; pIndex++){
AudioUnitGetProperty(_audioUnit, kAudioUnitProperty_ParameterInfo, kAudioUnitScope_Global, parameterIDs[pIndex], ¶meterInfo_t, ¶meterInfoSize);
// do whatever you want with each parameter...
}