--- fluid_alsa.c.~1.4.~ 2003-04-03 13:32:56.000000000 -0800 +++ fluid_alsa.c 2003-05-31 20:24:11.000000000 -0700 @@ -178,12 +178,15 @@ char* device; pthread_attr_t attr; int sched = SCHED_FIFO; + struct sched_param priority; int i, err, dir = 0; snd_pcm_hw_params_t* hwparams; snd_pcm_sw_params_t* swparams = NULL; snd_pcm_uframes_t uframes; unsigned int tmp; + priority.sched_priority = 90; + dev = FLUID_NEW(fluid_alsa_audio_driver_t); if (dev == NULL) { FLUID_LOG(FLUID_ERR, "Out of memory"); @@ -335,6 +338,9 @@ } } + if (sched == SCHED_FIFO) + pthread_attr_setschedparam (&attr, &priority); + err = pthread_create(&dev->thread, &attr, fluid_alsa_formats[i].run, (void*) dev); if (err) { FLUID_LOG(FLUID_WARN, "Couldn't set high priority scheduling for the audio output");