1

I am currently writing some code to prototype an app which will host AudioUnit instruments. I am using AudioToolbox for this as it appears to be the most complete API available (AVFoundation looks good but seems limited in terms of MusicSequences which are important to my app). The app will run only on OS X.

I have my AudioUnit set up in a graph and I can hear its output. What I want to do now is provide a list of AudioUnit instruments installed on the system so that I can swap out the instrument (currently I'm just using the first returned by AudioComponentFindNext). AVAudioUnit in AVFoundation provides name and manufacturerName properties but I can see any way of accessing this information with the lower level types. As anybody who can answer this question will know the documentation is quite basic (I've found the stuff in the headers most useful). I've tried poking at parameters and properties of the AudioUnit but this appears to relate to device parameters rather than metadata about the unit itself.

Andrew
  • 251
  • 1
  • 8

1 Answers1

0

As is often the way, I found the answer right after posting this. You can use AudioComponentCopyName to get the component name and manufacturer name in a colon separated string.

 CFStringRef compName;
 AudioComponentCopyName(currentComponent, &compName);
 NSLog(@"%@", compName);
 CFRelease(compName);

This will provide output such as this (depending on what you have installed of course):

...
2015-01-17 19:57:19.331 AUTest[3774:1494743] Apple: DLSMusicDevice
2015-01-17 19:57:19.331 AUTest[3774:1494743] Apple: AUMIDISynth
2015-01-17 19:57:19.331 AUTest[3774:1494743] Apple: AUSampler
2015-01-17 19:57:19.333 AUTest[3774:1494743] Arturia: Analog Lab
...
Andrew
  • 251
  • 1
  • 8