gpt4 book ai didi

objective-c - kAudioUnitType_MusicEffect 子类型研究

转载 作者:行者123 更新时间:2023-12-03 17:49:09 29 4
gpt4 key购买 nike

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

最佳答案

您可以通过匹配空白描述 (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 学会了这项技术视频。

关于objective-c - kAudioUnitType_MusicEffect 子类型研究,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33057442/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com