static void
audio_raise_priority (void)
{
// The RT code tends to crash my kernel :-(
// #if defined(_POSIX_PRIORITY_SCHEDULING) && 0 /* replace this line */
#if defined(_POSIX_PRIORITY_SCHEDULING) /* with this one for priority scheduling - DP */
struct sched_param sp;
sp.sched_priority = 40;
if(sched_setscheduler(0, SCHED_FIFO, &sp) == 0) {
printf(">> running as real-time process now\n");
} else {
fprintf(stderr,"WARNING: Can't get real-time priority (try running as root)!\n");
}
#else
if(nice_value == 0) {
if(!nice(-14)) {
nice_value = -14;
}
}
#endif
}