Re: Streaming Graph to file without a sound
Re: Streaming Graph to file without a sound
- Subject: Re: Streaming Graph to file without a sound
- From: Craig Hopson <email@hidden>
- Date: Tue, 20 Jun 2006 10:31:27 -0600
Hi Brian,
Thanks for the push in the right direction, export is working now.
As for the other issue (and speaking from my vast experience of the
hour or so it took me to implement), so far I have not had any
problems with exporting. To this point, however, all of the files
have been small - less than a minute. We sometimes set the
_OutputIsSilence flag in our Render calls, but whenever this happens
the buffer is filled with zeros. If I do run into any problems I'll
pass any information I can get on to you (and the list).
-Craig
On Jun 19, 2006, at 6:55 PM, William Stewart wrote:
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:
40redrocksw.com
This email sent to email@hidden
***************************************************
Craig Hopson, Managing Partner
Red Rock Software, Inc.
10 West Broadway, Suite 850
Salt Lake City, UT 84101
office: 801.322.4322 x103
cell: 801.949.3526
http://www.redrocksw.com
_______________________________________________
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