Re: [linux-audio-dev] Realtime problems with midi/osc sequencer

From: Robin Gareus <robin@email-addr-hidden>
Date: Sat Mar 10 2007 - 18:01:40 EET

> usleep( iTick-( passedTime-startTime ) );

AFAIR usleep is not exact! - did you
 echo 1024 > /proc/sys/dev/rtc/max-user-freq ?

try sth like:

void select_sleep (int usec) {
        fd_set fd;
        int max_fd=0;
        struct timeval tv = { 0, 0 };
        tv.tv_sec = 0; tv.tv_usec = usec;

        FD_ZERO(&fd);
        if (remote_en) {
                max_fd=remote_fd_set(&fd);
        }

        select(max_fd, &fd, NULL, NULL, &tv);

}
Received on Sat Mar 10 20:15:03 2007

This archive was generated by hypermail 2.1.8 : Sat Mar 10 2007 - 20:15:03 EET