I had rebuilt mpg123 0.59s with the SET_RT option, applied Andrew's
realtime patches (2.4.16) and I was still getting dropouts and slowdows
during CD ROM and network activity, even with -b 4096!   I was about to
post a detailed scenario when I looked closer at the mpg123 code:

1 #ifdef SET_RT
2       if (param.realtime) {  /* Get real-time priority */
3         struct sched_param sp;
4         if (!param.quiet) {
5                 fprintf(stderr,"Getting real-time priority\n");
6         }
7         memset(&sp, 0, sizeof(struct sched_param));
8         sp.sched_priority = sched_get_priority_min(SCHED_FIFO);
9         if (sched_setscheduler(0, SCHED_RR, &sp) == -1)
10          fprintf(stderr,"Can't get real-time priority\n");
11
12      }
13 #endif

My problem seems to go away if I change lines 8 and 9 to be:

8         sp.sched_priority = sched_get_priority_max(SCHED_FIFO);
9         if (sched_setscheduler(0, SCHED_FIFO, &sp) == -1)

Which seems to be the recommended usage for sound apps. Is there
something more subtle the original code was trying to achieve?  I do
not profess to be a realtime API expert by any means.

thx
mp

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

Reply via email to