On Wed, 2 Feb 2005, Thomas Grill wrote:
Hi all, i just noticed that in m_sched.c the value of sys_sleepgrain is always the same (5000 = 5ms), no matter which amount of latency i specified in the audio settings. This seems to be that way because the value of sys_sleepgrain is initialized when the scheduler is started and is not updated afterwards. Could be the cause of some latency-related troubles, or am i overlooking something?
Looks like a bug. I never fully understood the usage of sleep in the pd scheduler, because sleep timer resolution is never smaller than 10 ms under Linux. Thats why pd under linux always did blocking read/writes, using the soundcard as a timer.
Not sure if this is still true and how the timers on other operating systems behave, but if they behave similar then it doesn't matter if you set the the sleepgrain to 1 or 5 ms, it will always sleep 10.
Guenter
best greetings, Thomas
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev