音频单元未声明的标识符
我正在尝试使用这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;
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>