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: William Stewart <email@hidden>
- Date: Mon, 19 Jun 2006 12:00:40 -0700
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.
More details would be appreciated.
Thanks
Bill
On 19/06/2006, at 10:56 AM, Brian Whitman wrote:
If you install XCode2.3 the PlaySequence version there has a
"export to file" option. The basics of it are
1) swap your output unit with a generic output unit
2) tell all the AUs in the graph to go offline,
3) have a render callback on something right before the output unit
with the writeAsync stuff in it,
4) call AudioUnitRender on the generic output unit.
There is some strange bug/feature associated with
kAudioUnitRenderAction_OutputIsSilence in the rendering that
segfaults if you don't check for it, I never got around to really
testing it out.
If you still need help come back and ask-- this is something I am
intimately familiar with :)
-B
--
http://variogr.am/
On Jun 19, 2006, at 1:47 PM, Craig Hopson wrote:
I understand that I can use ExtAudioFileWriteAsync (etc.) to
create a file and stream the output of my graph to it. Here's the
twist... I don't want to hear the output while I'm writing the
file. So, this is more like Export to file. My graph currently
consists of custom generator unit(s), connected to a matrix mixer,
connected to the default output unit. I need the graph to
generate the output because I rely on event timing from the
MusicSequence and the graph drives this nicely.
I suppose for my export I could spoof the output unit by filling
its buffers with zeros while writing the actual data to file.
This seems a bit much. Am I missing something simple? Should I
switch to AUHAL rather than the default unit for the export? Is
there support in AUHAL for this that I've missed?
Thanks for any help.
Craig Hopson
Red Rock Software
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40media.mit.edu
This email sent to email@hidden
_______________________________________________
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
--
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