作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在 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/
我正在尝试在 CoreAudio 中查找此 kAudioUnitType_MusicEffect 的所有子类型。所有其他类型都有详细记录,但这似乎根本没有。有人可以说明 kAudioUnitType_
我是一名优秀的程序员,十分优秀!