Re: ios bounce offline augraph to file
Re: ios bounce offline augraph to file
- Subject: Re: ios bounce offline augraph to file
- From: Gregory Wieber <email@hidden>
- Date: Mon, 7 Feb 2011 10:49:38 -0800
So, what you need to do is make sure that the ASBD that you set on the output unit matches what you're using in your real time context. Also, remember that audio units have both input and output properties -- I set it for both on mine out of an abundance of caution. Pay attention to the number of channels, channels per frame, that sort of stuff.
Second, make sure that the bufferlist you are passing to the output unit render procedure contains the correct number of buffers. So, if your real time context uses 1 buffer, make sure your bufferlist that you pass to the output unit contains 1 buffer. Also, if it's looking for 2 buffers, again, the issue is probably with needing to set an ASBD.
best,
Greg
On Mon, Feb 7, 2011 at 10:14 AM, Frank Mantek
<email@hidden> wrote:
I am actually struggling with the same thing right now that you mentioned before: when the offline renderer is called using AudioUnitRender it suddenly sends me iodata->mBuffers = 2 into my renderer, and i suspect that i am setting something up incorrectly to make that happen.
I think i am doing very close to what you are doing: create the extaudio file with a target format, set the client format etc.
actually the whole code works if i start the graph and record while the music is playing so to speak. But calling AudioUnitRender on the generic output creates the effect described above....
A hint would be appreciated.
Frank
On Feb 6, 2011, at 10:47 PM, Gregory Wieber wrote:
Success! I've been able to get an audio unit graph to bounce to an AIFF file offline by:
1) removing my remoteIO unit
2) adding a generic output unit to my graph
3) using the ExtAudioFile (this was a gotcha. I had somehow gone down the path of using Audio File Services at first)
4) Making the ExtAudioFileRef use a ABSD with big endian format flag
5) Setting the ExtAudioFile property kExtAudioFileProperty_ClientDataFormat to my audio units ABSD (little endian)
6) creating a buffer inside my bounce loop ( a for loop that looks progresses through all my music events )
7) creating a timestamp using the FillOutAudioTimeStampWithSampleTime helper function
8) Writing a number of frames, and incrementing my sample time
9) freeing the buffer, exiting the loop
9) Closing the audio file.
Phew. Well, goes to show how helpful this mailing list can be, even if I'm just talking to myself :)
Hope this helps someone.
best,
Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
This email sent to email@hidden
_______________________________________________
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