Re: Streaming Graph to file
Re: Streaming Graph to file
- Subject: Re: Streaming Graph to file
- From: Brian Whitman <email@hidden>
- Date: Fri, 14 Apr 2006 16:44:16 -0400
On Apr 14, 2006, at 3:11 PM, William Stewart wrote:
Do you do this on pre or post render? You should be doing this on
PostRender, as that is when:
(1) The buffer will have valid audio contents
(2) The buffer pointers will be set
My suspicion is that you are calling to the Write call from the
render notification, but doing it both at pre and post render. At
pre render, the buffer list probably has NULL data pointers (which
the render call will reset), and the ExtAFWrite call is not
checking for null pointers.
You were right, thanks!! My render callback now does:
OSStatus renderMixerProc(void *stuff, AudioUnitRenderActionFlags
*ioActionFlags,
const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber,
UInt32 inNumberFrames, AudioBufferList *ioData) {
ourClass *def = (ourClass *)stuff; // get access to Obj-C data
if(*ioActionFlags & kAudioUnitRenderAction_PostRender) {
ExtAudioFileWriteAsync(def->of, inNumberFrames, ioData);
}
return 0;
}
And everything works. I'll file a report for the pre-render case
"crash."
-Brian
_______________________________________________
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