小编Gar*_*rah的帖子

将KAudioUnitSubType_Reverb2添加到AUGraph时,AUGraphInitialize错误代码-10868

我正在尝试将类型的AudioUnit添加kAudioUnitSubType_Reverb2到一个AUGraph并且我得到一个-10868 (kAudioUnitErr_FormatNotSupported)支持的错误AUGraphInitialize.我的出发点是Apple的iPhoneMixerEQGraphTest示例应用程序,我基本上只是为混响添加了一个新的AudioUnit,但无法让它工作.

这是代码 -

- (void)initializeAUGraph
{
    printf("initializeAUGraph\n");

    AUNode outputNode;
    AUNode eqNode;
    AUNode mixerNode;
    AUNode reverbNode;

    printf("create client ASBD\n");

    // client format audio goes into the mixer
    mClientFormat.SetCanonical(2, true);                        
    mClientFormat.mSampleRate = kGraphSampleRate;
    mClientFormat.Print();

    printf("create output ASBD\n");

    // output format
    mOutputFormat.SetAUCanonical(2, false);                     
    mOutputFormat.mSampleRate = kGraphSampleRate;
    mOutputFormat.Print();

    OSStatus result = noErr;

    // load up the audio data
    [self performSelectorInBackground:@selector(loadFiles) withObject:nil];

    printf("new AUGraph\n");

    // create a new AUGraph
    result = NewAUGraph(&mGraph);
    if (result) { printf("NewAUGraph …
Run Code Online (Sandbox Code Playgroud)

iphone audio xcode objective-c ios

5
推荐指数
1
解决办法
2765
查看次数

标签 统计

audio ×1

ios ×1

iphone ×1

objective-c ×1

xcode ×1