Re: Streaming Graph to file
Re: Streaming Graph to file
- Subject: Re: Streaming Graph to file
- From: Karim Morsy <email@hidden>
- Date: Mon, 6 Mar 2006 11:40:13 +0100
Geoff,
will still need to call AudioUnitRender on the mixer and then pass it to ExtAudioFileWrite.
just a hint in case you haven't already done so... use ExtAudioFileWriteAsync instead of ExtAudioFileWrite. It is much easier to use, as it performs the write for you on an internal thread very efficiently and you don't have to worry about managing buffers and threads. before starting your audio capture you should initialize the async write: ExtAudioFileWriteAsync(outfile, 0, NULL).
Ideally i wish I could just hook the file to the graph instead of an output unit and just start the graph.
with this approach you can hook the file to any audio unit in your graph (alternatively you could also try to use augraphaddrendernotify). whenever your graph is running and you want to start recording, just add a render notification call back function to the audio unit from which you want to save the audio data to file. and in the audio unit's post render notification perform the write: if(inBusNumber ==0 && (*ioActionFlags & kAudioUnitRenderAction_PostRender)) err= ExtAudioFileWriteAsync(outfile, inNumFrames, ioData); when you're done remove the render notify and dispose the audio file.
Karim |
_______________________________________________
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