0

I'm trying to find all subtypes of this kAudioUnitType_MusicEffect in CoreAudio. all other types are well documented but this it seems not at all. Someone can illustrate all subTypes of kAudioUnitType_MusicEffect ?

Vasa
  • 135
  • 8

1 Answers1

1

You can iterate through all components by matching against a blank description (searchDesc). Then you just get that component's description (desc). So here I filter all the kAudioUnitType_Effect subtypes and print the component name. (kAudioUnitType_MusicEffect gave me nothing).

AudioComponentDescription searchDesc = { 0, 0, 0, 0, 0 };
AudioComponent comp = NULL;

while (true) {

    comp = AudioComponentFindNext(comp, &searchDesc);
    if (comp == NULL) break;

    AudioComponentDescription desc;
    if (AudioComponentGetDescription(comp, &desc)) continue;

    if (desc.componentType == kAudioUnitType_Effect) {

        CFStringRef stringRef = NULL;
        AudioComponentCopyName(comp, &stringRef);
        NSString *name = (__bridge_transfer NSString *)stringRef;
        NSLog(@"component name %@ ",name);

    }

}

I learned this technique watching this video.

dave234
  • 4,793
  • 1
  • 14
  • 29