• 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 without a sound
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Streaming Graph to file without a sound


  • Subject: Re: Streaming Graph to file without a sound
  • From: William Stewart <email@hidden>
  • Date: Mon, 19 Jun 2006 17:55:57 -0700

Brian,

I'm not sure I understand you.

Here's the API:
ExtAudioFileWriteAsync(		ExtAudioFileRef			inExtAudioFile,
							UInt32					inNumberFrames,
							const AudioBufferList * ioData)	

All that the client passes to this API call is the buffer of data and the number of frames contained in it.

I think the problem is that you can't pass (and I think now that you mention this that we might have filed a bug about this and fixed it) a buffer list with NULL mData ptrs (which is a convention we use in the AU world so that the AU can pass back its own buffer to the caller). So, you could definitely have problems if you called the write call from the PRE-render side of this callback. This also doesn't make sense to do in any case - on the pre-render side there is nothing in the buffer list that you would want to write - its *before* the AU has had a chance to do anything for this render call.

As there are no render flags passed to the ExtWrite call, I'm not sure how the silence flag could be interacting with this. If this flag is set, we still expect the buffer contents to be valid - its just that they will be full of silence. If these aren't the case (and some AU is setting this flag but returning say NULL buffer pointers - then this is a problem with that AU and something I'd like more info in).

Thanks

Bill

On 19/06/2006, at 1:41 PM, Brian Whitman wrote:


On Jun 19, 2006, at 3:00 PM, William Stewart wrote:

Brian,

I'm not sure what the segfault is - I've never heard of this before. The render code is pretty straight forward:
outputBuffer.Prepare();
AudioUnitRenderActionFlags actionFlags = 0;
require_noerr (result = AudioUnitRender (outputUnit, &actionFlags, &tStamp, 0, numFrames, outputBuffer.ABL()), fail);


and actionFlags are not being used after the call to AudioUnitRender.



It's in the render callback that I use. It's some issue with ExtAudioFileWriteAsync. Is the kAudioUnitRenderAction_OutputIsSilence is set on PostRender but not on PreRender, the call to the writing function segfaults. This happens a bit with our code. It's very possible we have a problem upstream. To get around it I explicitly check for those silence flags.



--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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


  • Follow-Ups:
    • Re: Streaming Graph to file without a sound
      • From: Craig Hopson <email@hidden>
References: 
 >Streaming Graph to file without a sound (From: Craig Hopson <email@hidden>)
 >Re: Streaming Graph to file without a sound (From: Brian Whitman <email@hidden>)
 >Re: Streaming Graph to file without a sound (From: William Stewart <email@hidden>)
 >Re: Streaming Graph to file without a sound (From: Brian Whitman <email@hidden>)

  • Prev by Date: Re: Monitoring input level
  • Next by Date: Re: AU instrument on top of complete MIDI synth
  • Previous by thread: Re: Streaming Graph to file without a sound
  • Next by thread: Re: Streaming Graph to file without a sound
  • Index(es):
    • Date
    • Thread