Re: Streaming Graph to file
Re: Streaming Graph to file
- Subject: Re: Streaming Graph to file
- From: William Stewart <email@hidden>
- Date: Fri, 3 Mar 2006 19:02:57 -0800
On 03/03/2006, at 12:20 PM, Geoff Hufford wrote:
I am subclassing the Public utility class CAAudioFileReader as the
source
for a graph that plays several files simultaneously. The graph is
organized
with an OutputUnit -> Main StereoMixer -> StereoMixer(s)->
CAAudioFileReader(s) input proc. Now I am trying to refine a
(better than
real-time) saving to a file strategy.
Approach 1:
I subclassed the Public utility class CAAudioFileWriter.
Set up the desired file settings.
Repeatedly call AudioUnitRender on the Main Stereo mixer in the graph
followed by CAAudioFileReader::PushBuffer
Managing the process is difficult, and I am having audio dropouts
in the
saved file. Firstly, the AudioUnitRender function may trigger
threaded file
reading, so subsequent AudioUnitRender calls may not have the data
loaded to
succeed. The second difficulty is knowing if the writer is getting
behind.
Approach 2:
I havent written it yet but I am considering switching to use
ExtAudioFile.
My plan is using ExtAudioFileCreateNew. Then get the
kAudioUnitProperty_StreamFormat from the Mixer in the graph. Set
ExtAudioFileSetProperty - kExtAudioFileProperty_ClientDataFormat
from the
mixer. I will still need to call AudioUnitRender on the mixer and
then pass
it to ExtAudioFileWrite.
that's the approach I would advise
Bill
Any advice? Is there an even better approach? Ideally i wish I
could just
hook the file to the graph instead of an output unit and just start
the
graph.
Regards,
Geoff Hufford
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