• 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
Streaming Graph to file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Streaming Graph to file


  • Subject: Streaming Graph to file
  • From: Geoff Hufford <email@hidden>
  • Date: Fri, 03 Mar 2006 14:20:12 -0600

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.

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

  • Follow-Ups:
    • Re: Streaming Graph to file
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Dropouts while Graph is running
  • Next by Date: Re: Core Audio/Midi sync accuracy?
  • Previous by thread: Re: AudioUnitRender error
  • Next by thread: Re: Streaming Graph to file
  • Index(es):
    • Date
    • Thread