开发者

RemoteIO callback after AUMixer

开发者_高级运维What is the correct way to implement a callback on the RemoteIO after the aumixer has done it's thang.

If i use ;

result = AUGraphSetNodeInputCallback(mGraph, outputNode,1, &remoteIOCallback);

It doesn't call my function

If I use ..

result = AudioUnitSetProperty(mIONode, kAudioOutputUnitProperty_SetInputCallback, kAudioUnitScope_Input, 1 , &remoteIOCallback, sizeof(remoteIOCallback));

It calls my callback but when i try to create a pointer to the ioData

AudioSampleType *inData = (AudioSampleType *) ioData->mBuffers[0].mData;

it crashes.

I cannot see the problem at all. Is this a problem with the buffers? But then i'm not allocating anything to the buffer, just a pointer to it.

Cheers


Instead of immediately casting to an AudioSampleType*, first try casting ioData to your custom data type. Then try accessing the data in the buffer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜