I am writing an Objective-C++ framework which needs to host Audio Units. Everything works perfectly fine if I attempt to make use of Apple's default units like the DLS Synth and various effects. However, my application seems to be unable to find any third-party Audio Units (in /Library/Audio/Plug-Ins/Components).
For example, the following code snippet...
CAComponentDescription tInstrumentDesc = CAComponentDescription('aumu','dls ','appl'); AUGraphAddNode(mGraph, &tInstrumentDesc, &mInstrumentNode); AUGraphOpen(mGraph);
...works just fine. However, if I instead initialize tInstrumentDesc
with 'aumu', 'NiMa', '-Ni-'
(the description for Native Instruments' Massive Synth), then AUGraphOpen()
will return the OSStatus
error badComponentType
and the AUGraph will fail to open. This holds true for all of my third party Audio Units.
The following code, modified from the Audacity source, sheds a little light on the problem. It loops through all of the available Audio Units of a certain type and prints out their name.
ComponentDescription d; d.componentType = 'aumu'; d.componentSubType = 0; d.componentManufacturer = 0; d.componentFlags = 0; d.componentFlagsMask = 0; Component c = FindNextComponent(NULL, &d); while(c != NULL) { ComponentDescription found; Handle nameHandle = NewHandle(0); GetComponentInfo(c, &found, nameHandle, 0, 0); printf((*nameHandle)+1); printf("\n"); c = FindNextComponent(c, &d); }
After running this code, the only output is Apple: DLSMusicDevice
(which is the Audio Unit fitting the description 'aumu', 'dls ', 'appl'
above).
This doesn't seem to be a problem with the units themselves, as Apple's auval
tool lists my third party Units (they validate too).
I've tried running my test application with sudo
, and the custom framework I'm working on is in /Library/Frameworks.