Re: USB Audio driver and THREAD_TIME_CONSTRAINT_POLICY
Re: USB Audio driver and THREAD_TIME_CONSTRAINT_POLICY
- Subject: Re: USB Audio driver and THREAD_TIME_CONSTRAINT_POLICY
- From: Ross Bencina <email@hidden>
- Date: Tue, 20 Dec 2011 01:00:06 +1100
Hi Vyacheslav,
Some random thoughts:
You will lose real-time priority if for some reason you violate the
constraint. You could try setting constraint higher just to see if that
helps.
On 17/12/2011 2:01 AM, Vyacheslav Matyushin wrote:
> IODelay(500 - ((time2 - time1) / 1000));
Are you sure clock_get_uptime() is what you want? Seems like
clock_get_system_nanotime() would be more appropriate if you're trying
to reliably get values in nanoseconds, see:
http://lists.apple.com/archives/Darwin-drivers/2004/Jul/msg00014.html
http://lists.apple.com/archives/Darwin-drivers/2004/Jul/msg00016.html
On 20/12/2011 12:15 AM, Vyacheslav Matyushin wrote:
> ret = nanosleep(&rqt, NULL); // sleep for SLEEP_NS seconds
Have you tried testing against mach_wait_until instead?
> #define ERROR_THRESH_NS ((double)50000) // 50 us
Personally I would expect more like 150us jitter in userspace -- but
this is just based on a few rough tests I've done.. nothing scientific.
Apologies if this is not helpful,
Ross.
_______________________________________________
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