I can't test that on my empeg right now at work, but on my i686 Linux box at home, a select seems to give me results that are a lot closer than using nanosleep.

That could be because, unlike an Empeg with the player software running, your i686 Linux box doesn't have a large number of SCHED_RR threads running, some of them doing sporadically CPU-intensive tasks.

That's also why, on the player, having another process busy-waiting at normal priority doesn't hose playback. Most of the player is SCHED_RR which means that if it's runnable, it runs and you don't, end of story.

Busy-waiting at SCHED_RR is quite definitely a bad thing.

Peter