Re: [linux-audio-dev] sound/gui interaction

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] sound/gui interaction
From: douglas irving repetto (douglas_AT_roar.music.columbia.edu)
Date: Thu Jul 20 2000 - 23:11:16 EEST


Benno Senoner wrote:
>
> On Thu, 20 Jul 2000, douglas irving repetto wrote:
> I heard that older versions of linux have some problems with this call but I am
> not sure:
>
> what I usually do is just use sched_setscheduler() at the begin of the thread's
> mainloop before I jump to the endless DSP processing loop.
>
> every thread sets it's own policy, I know it's not nice but it works.
>
> if someone has infos about the pthread_schedparam problems
> (or non problems) then let me know please.
>
> Benno.
>

that did it! just putting:

        struct sched_param schp;

        // set the process to realtime privs
         
        memset(&schp, 0, sizeof(schp));
        schp.sched_priority = sched_get_priority_max(SCHED_FIFO);

        if (sched_setscheduler(0, SCHED_FIFO, &schp) != 0)
                perror("sched_setscheduler");
        else
                printf("SCHED_FIFO set!\n");

at the start of my processing thread loop seems to do the trick.

thanks! now i need to figure out about the running as root problem...

douglas

-- 
                        douglas irving repetto 
                  http://music.columbia.edu/~douglas 
                the music-dsp mailing list and website:
                  http://shoko.calarts.edu/musicdsp


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jul 20 2000 - 23:44:50 EEST