Re: How long do render callbacks have to execute?
Re: How long do render callbacks have to execute?
- Subject: Re: How long do render callbacks have to execute?
- From: Brian Willoughby <email@hidden>
- Date: Fri, 12 Aug 2011 14:13:27 -0700
On Aug 12, 2011, at 13:36, Jonathan wrote:
I have two callbacks that each feed into a mixer, and then I have a
render notify callback on the output of the mixer which feeds into
the remote IO unit.
How much time do I have in each of those call backs? I'm assuming
it's related to the IO Buffer duration.. so let's say I have it set
to .005 seconds. Does that mean that each of the callbacks have .
005 seconds to return, or is the duration divided by the number of
callbacks? For example, if there are three callbacks in succession
that each take .004 seconds to fill buffers, is that going to meet
the requirement or no?
The final audio is supposed to be continuous time, so if your IO
Buffer is .005 seconds then you must complete all audio processing
within that time, plus there must be some time left over for the non-
audio programming. Adding callbacks does not give you more time.
In your example with 3 callbacks, you probably only have about 0.001
seconds in each callback, with the remainder going to non-audio code.
Related to that, is there a way to reliably detect when the boat is
missed, so to speak, so I can detect if the user is experiencing
skips?
There are two ways. First of all, there should be a CoreAudio
notification when you skip. You won't get this unless you register
for the notification callback, specifically, so look it up in the
documentation. I'm not sure whether iOS supports this notification,
but I assume it would have to just like OSX. Second of all, the
remote I/O unit should give you a time stamp on every callback, and
if these are not contiguous then you have suffered a skip.
Brian Willoughby
Sound Consulting
_______________________________________________
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