audiounit - is it possible to enumerate Audio Unit parameter descriptions? -
is there way audio unit host step through plugin's parameters , gain such information as:
- parameter name string e.g. "delay time"
- parameter range (minimum, maximum)
- parameter units (e.g. seconds)
- parameter control (e.g. slider)
afaict information available in plugin, can't figure out how query host side.
you'll first need #import caauparameter , auparaminfo (which can found in /developer/extras/coreaudio/publicutility).
edit: these files found in "audio tools xcode" package. can going xcode > open developer tool > more developer tools...
assuming have audiounit called theunit following code set iterate through theunit's parameters:
bool includeexpert = false; bool includereadonly = false; auparaminfo info (theunit, includeexpert, includereadonly); for(int = 0; < info.numparams(); i++) { if(null != info.getparaminfo(i)) { // things info here } } for example, info.getparaminfo(i))->paraminfo() give audiounitparameterinfo struct defined follows:
typedef struct audiounitparameterinfo { char name[52]; cfstringref unitname; uint32 clumpid; cfstringref cfnamestring; audiounitparameterunit unit; audiounitparametervalue minvalue; audiounitparametervalue maxvalue; audiounitparametervalue defaultvalue; uint32 flags; } audiounitparameterinfo; note you'll need open audiounit first (eg. calling augraphopen() on graph contains unit).
Comments
Post a Comment