Re: [linux-audio-dev] Sequencer Sync Woes

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

Subject: Re: [linux-audio-dev] Sequencer Sync Woes
From: Billy Biggs (bbiggs_AT_DIV8.NET)
Date: Tue Feb 06 2001 - 18:34:53 EET


Paul Davis (pbd_AT_Op.Net):

> > So, maybe I'm ok to use /dev/midi00? Is that what everyone else
> > uses? Am I doing something wrong in my loop? Is there a way to
> > yield a smaller amount of time maybe so I can poll more often?
>
> i'd use this (below). the key is to hook into the call to RTC::tick().
>
> the object below starts its own thread which sets up the RTC to
> provide a periodic wakeup (freq up to 8kHz).
>
> the design assumes that the thread will run with SCHED_FIFO priority
> and has its memory locked down. the responsibility for checking the
> *actual* time lies with whatever decides to receive the "tick()"
> signal.

  Thanks alot for the code!

  I first just assuming that for every read(), exactly rtc::hz time
passed. This wasn't great, since you get pileups more often than I
thought. I have a P3-700, and just switching desktops caused skips.

  Now I use the RTC code just for throttling, and call gettimeofday to
check the actual time (as you suggested). This seems 'acceptable'. I
can only make it skip by ls -lR'ing my drive (this seems ridiculous, but
I'll try it for now).

  Would it be worthwhile to create a new kernel module for doing a
sequencer intermediary? Just an interface to /dev/midi* with
timestamps. I wonder if I couldn't make it driver compatible with
anything that supports /dev/midi* . . . Seems like it would be an easy
fix to better help support user-level sequencers.

  Thanks again for the code, I'll clean the rest of my stuff up and
release my app.

-- 
Billy Biggs                     bbiggs_AT_dumbterm.net
http://www.billybiggs.com/      wbiggs_AT_uwaterloo.ca


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

This archive was generated by hypermail 2b28 : Tue Feb 06 2001 - 18:48:04 EET