AUGraph with own render thread
AUGraph with own render thread
- Subject: AUGraph with own render thread
- From: Heinrich Fink <email@hidden>
- Date: Tue, 08 Nov 2011 18:08:54 +0100
Fellow audio programmers,
I am working on an audio engine for a broadcast application based on AudioUnits (which is preferably also using the AUGraph API). This engine is mainly doing mixing of different input buses and should be capable of using AudioUnit-based effect plugins.
Most SDKs for professional video cards that I have to work with require audio to be delivered together with video frames. That means at the end of my graph can't be a real HAL-based audio device. I rather have to buffer the output audio stream (the samples arriving the end of my graph) in a ring buffer and have it ready to be picked up by the calls from the video card's SDK. In this case I would be using a AUGenericOutput instance in the graph, and would have to call AudioUnitRender manually on this output unit.
Now my question is, since I am not able to use hardware I/O thread provided by the AUHal, what is the best way to create a manual audio render callback thread without having to sacrifice too much performance. And how could I figure out the optimal interval for issuing AudioUnitRender? I assume that the AUHal triggers a render call according to the audio hardware buffer size (e.g. 512 frames @ 44100 ~= every 12ms). Does anyone have had experience with this?
Also, am I right with the assumption that modifying the AUGraph's state using a generic output unit, with a manual render callback, is still thread safe? How does the AUGraph know of me issuing a render callback? (I guess it's automatically requiring a render notification on the output unit and using this as a sync point….).
thanks in advance,
best regards,
Heinrich _______________________________________________
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