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: Tue, 05 Mar 2013 00:10:21 +1100
Chris,
Success!!!! The key was setting the output scope for the generic output unit it seems! All seems to render fine now.
FYI the mFormatFlag was 12, which I assume isn't 0x20, so interleaved?
The ASBD printout shown below.
Many thanks!!
David
Initializing the audio processing graph
Sample Rate: 44100
Format ID: lpcm
Format Flags: C
Bytes per Packet: 2
Frames per Packet: 1
Bytes per Frame: 2
Channels per Frame: 1
Bits per Channel: 16
On 4 March 2013 22:50, Chris Adamson
<email@hidden> wrote:
Yeah, if you don't explicitly the format for output scope / bus 0, you'll get a default value.
Once you've built your graph, how about you do:
AudioStreamBasicDescription outFormat = {};
OSErr err = AudioUnitGetProperty (outputUnit, kAudioUnitPropertyStreamFormat, kAudioUnitScope_Output, 0, &outFormat);
Then set a breakpoint after this and inspect outFormat in the debugger. In particular, look at the value of mFormatFlags and see if kAudioFormatFlagIsNonInterleaved bit (1 << 5, aka 0x20) is set. That'll help you figure out if the AudioBufferList you use should have one AudioBuffer or two.
Just a shot, but I've had problems with -50 on AudioUnitRender multiple times that turned out to be having the wrong number of AudioBuffers in my ABL.
--Chris
On Mar 4, 2013, at 6:17 AM, David Blake <
email@hidden> wrote:
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!
_______________________________________________
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