Re: AUGraph with own render thread
Re: AUGraph with own render thread
- Subject: Re: AUGraph with own render thread
- From: Heinrich Fink <email@hidden>
- Date: Wed, 09 Nov 2011 14:22:41 +0100
Hi,
> Sounds like a custom output audio unit might be the way to go, as you say, recreating what Apple's output one does.
Yes, it seems so. Although I am not sure if there are any nontrivial challenges of implementing a valid custom output unit (I couldn't find threads on this list or sample code for subclassing an output audio unit). My first guess would be to start with the AUBase / AUOutputBase C++ classes in the CoreAudio SDK and work my way through until auval validates the audio unit.
Another option would be to just manually call AudioUnitRender on whatever head node(s) I have in the graph (which avoids creating a custom output unit at all).
Any recommendations here?
> Could you drive the timing from the video card SDK's callbacks, setting a 'low water mark' on the ring buffer and filling appropriately with render calls when it gets low? Given that you already have timing presented to you by the SDK, perhaps it'd be most simple and clean to use that?
That might be an option, but there might be other audio consumers than just the video card's SDK callback (other video cards with different SDKs, or a local audio device for audio monitoring, etc…). Therefore I believe it makes more sense to render audio faster than the actual SDKs timing and to buffer it separately for each audio output consumer. Also, I have a feeling that the whole graph behaves nicer if being sampled at a regular, shorter interval (but I might be wrong here…).
best,
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