本文介绍了音频单元未声明的标识符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用这2个链接中的代码(大致相同的 LINK1 LINK2 ).但是,即使第二个链接是Apple Prog指南,也无法使用.

Im trying to use code from these 2 links (pretty much the same LINK1 LINK2). But neither work even with the second link being an apple prog guide.

就像我说的那样,实际错误是许多数据类型上的使用未声明的标识符".为了使它简短一点,我将仅显示前2种数据类型.

Like I said the actual error is "use of undeclared identifier" on many of the data types. To keep this a little shorter I will just show the top 2 data types.

 AudioComponentInstance audioUnit;
 AudioComponentDescription desc;

根据搜索结果,这些应该是 this 表示它们在AudioUnit框架中. AudioUnit.framework已添加到与库的链接二进制文件"中,所以我不明白为什么找不到这些数据类型.

From the searching I have done these should be this which says they are in the AudioUnit framework. AudioUnit.framework is added to my "link binarys with libraries" so I dont understand why these data types are not found.

推荐答案

根据上述注释,我没有导入标头.我需要添加

Per the comments above i was not importing the header. I needed to add

#import <AudioUnit/AudioUnit.h>

这篇关于音频单元未声明的标识符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-27 19:33
查看更多