Re: Offline rendering in a AUGraph using a Generic Output node on iOS
Re: Offline rendering in a AUGraph using a Generic Output node on iOS
- Subject: Re: Offline rendering in a AUGraph using a Generic Output node on iOS
- From: David Blake <email@hidden>
- Date: Mon, 04 Mar 2013 22:20:06 +1100
Just to clarify, at the end of my masterRenderCallback I am using:
ExtAudioFileWriteAsync(remoteIOPlayer.exportFileRef, inNumberFrames, ioData);
to export the data, so am not using anything the Generic Output would do with ioData if that is what its expecting.
On 4 March 2013 22:17, David Blake
<email@hidden> wrote:
Hi Chris,
My ASBD is as follows:
Int16StreamFormat.mSampleRate = graphSampleRate;
Int16StreamFormat.mFormatID = kAudioFormatLinearPCM;
Int16StreamFormat.mFormatFlags = kAudioFormatFlagsCanonical ;
Int16StreamFormat.mFramesPerPacket = 1;
Int16StreamFormat.mChannelsPerFrame = 1;
Int16StreamFormat.mBitsPerChannel = 16;
Int16StreamFormat.mBytesPerPacket = 2;
Int16StreamFormat.mBytesPerFrame = 2;
This is assigned to the mixerUnitMaster (my graph goes masterRenderCallback -> mixerUnitMaster -> generic output )
result = AudioUnitSetProperty ( mixerUnitMaster,
kAudioUnitProperty_StreamFormat,
kAudioUnitScope_Input,
busNumber,
&Int16StreamFormat,
sizeof (Int16StreamFormat)
);
and then connected to the iONode (the node for 'outputUnit') like so:
result = AUGraphConnectNodeInput ( processingGraph, mixerNodeMaster, 0, iONode, 0 );
I assume by setting the ASBD on the mixerNodeMaster the outputUnit will inherit this ?
I notice you say the outputUnits output scope though, I am only setting the input scope - could this be the problem?
Thanks for any insight you can give!
David
On 4 March 2013 21:59, Chris Adamson
<email@hidden> wrote:
Can you show the AudioStreamBasicDescription that you will be getting from the output unit (ie, outputUnit's output scope, bus 0)?
If it's stereo and its flags set kAudioFormatFlagIsNonInterleaved, then your AudioBufferList should have two AudioBuffers. That's a common source of -50's when calling AudioUnitRender().
--Chris
On Mar 3, 2013, at 7:55 AM, David Blake <
email@hidden> wrote:
> In my research however no one seems to have an example of how to actually called AudioUnitRender from outside an existing callback. I have also come across historical posts from this list with people not sure if this even possible in a graph and you actually just have to interact with a single node itself? Has anyone achieved this, and if so do you think you could post some example code? I have posted my code below but I am getting the dreaded error -50 when I call AudioUnitRender()
_______________________________________________
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