On Sep 10, 2009, at 5:01 PM, ROBB A MANIA wrote:
> Hello All,
> I am experiencing an issue with AudioUnitRender() on the iPhone. I have an AUGraph with containing a 3DMixer with mono 44.1 kHz PCM inputs and stereo output.
ok
> This feeds into the AURIO unit. When I directly connect the 3DMixer to the AURIO unit using AUGraphConnectNodeInput(), everything runs perfectly.
natch :)
>
However, I
don't want to use the node connection. I want to use a callback in the AURIO unit which renders the 3DMixer.
ok
> When I attempt to do this, I am unable to successfully render the 3DMixer using AudioUnitRender() inside the AURIO callback. I get a -50 error from the AudioUnitRender command. The callback is very simple:
>
> static OSStatus rioCallback(void *inRefCon, AudioUnitRenderActionFlags*ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32inNumberFrames, AudioBufferList *ioData) {
>
> RSplayer *player = (RSplayer *)inRefCon;
> OSStatus err = 0;
>
> err = AudioUnitRender(player.masterMixer, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, ioData);
>
> return err;
> }
one of the parameters you are passing to
AudioUnitRender is wrong. Probably the ioData buffer list is not set up correctly?
>
> Is there a flag I should be setting other than what is supplied by the callback input?
you can't use the buffer pointer that is provided for you to get input from the rioUnit, to call for output of the mixer.
Its really not clear to me what you want to do, so perhaps you can just describe that (draw a quick signal flow diagram)
> I feel the issue may be something to do with mono inputs to the 3DMixer or a general peculiarity with rendering the 3DMixer. I was able to find a work around to this issue by inserting a MultiChannelMixer between the 3DMixer and the AURIO unit. Then I directly connect the3DMixer output to the MultiChannelMixer input. I am then able to successfully render the MultiChannelMixer using a similar version of this callback (replacing the audio unit that gets rendered obviously).
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden