• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Streaming Graph to file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Streaming Graph to file (From: Brian Whitman <email@hidden>)
 >Re: Streaming Graph to file (From: William Stewart <email@hidden>)

  • Prev by Date: Re: SoundConverterGetInfo & SoundComponentGetInfo
  • Next by Date: aggregate device
  • Previous by thread: Re: Streaming Graph to file
  • Next by thread: aggregate device
  • Index(es):
    • Date
    • Thread