我们开发了自定义音频单元和音频单元托管应用程序。我们正在尝试从应用程序动态注册自定义音频单元。下面的代码片段用于动态注册音频单元。(此代码片段在 Apple 技术说明 Technical Note TN2247 中提及)
#include <AudioUnit/AudioComponent.h>
extern AudioComponentPlugInInterface*
MyExampleAUFactoryFunction(const AudioComponentDescription *inDesc);
OSStatus RegisterMyExampleAudioUnit()
{
// fill out the version number for the AU
UInt32 theVersion = 0x00010000;
// fill out the AudioComponentDescription
AudioComponentDescription theDescription;
theDescription.componentType = kAudioUnitType_Effect;
theDescription.componentSubType = 'EXAU';
theDescription.componentManufacturer = 'MYCO';
theDescription.componentFlagsMask = 0;
// Use the flag to indicate that this AudioComponent is Sandbox Safe
theDescription.componentFlags = kAudioComponentFlag_SandboxSafe;
// call AudioComponentRegister()
return AudioComponentRegister(&theDescription, CFSTR("My Company: MyExampleAU"),
theVersion, MyExampleAUFactoryFunction);
在编译音频单元托管应用程序时,我们遇到了链接器错误。
架构 i386 的未定义符号:
“_MyExampleAUFactoryFunction”,引用自:
谁能帮我解决这个问题。