【问题标题】:kAudioUnitType_MusicEffect subtype researchkAudioUnitType_MusicEffect 亚型研究
【发布时间】:2015-10-10 18:20:52
【问题描述】:

我正在尝试在 CoreAudio 中查找此 kAudioUnitType_MusicEffect 的所有子类型。 所有其他类型都有据可查,但这似乎根本没有。 有人可以说明 kAudioUnitType_MusicEffect 的所有子类型吗?

【问题讨论】:

    标签: objective-c cocoa core-audio audiounit


    【解决方案1】:

    您可以通过匹配空白描述 (searchDesc) 来遍历所有组件。然后你就得到了那个组件的描述(desc)。所以在这里我过滤所有 kAudioUnitType_Effect 子类型并打印组件名称。 (kAudioUnitType_MusicEffect 什么也没给我)。

    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);
    
        }
    
    }
    

    我通过观看this 视频学会了这项技术。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-06-02
      • 1970-01-01
      • 2014-04-27
      • 1970-01-01
      • 2019-08-02
      • 2016-12-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多