Subject: Re: [linux-audio-dev] Sequencers & scheduling
From: Maurizio Umberto Puxeddu (umbpux_AT_tin.it)
Date: ma tammi 10 2000 - 14:14:37 EST
David Slomin wrote:
>
> Paul Winkler wrote:
> >
> > How do you handle the timing of events in the output?
> > I can think of only two general approaches...
>
> I've only thought about it, not implemented it, so take this with a
> grain of salt: What about a combination of the two?
>
> I assume the existence of an alarm() style system, although this is
> probably not accurate enough for the MuCoS folks. :-)
>
> Use the sorted queue, but don't poll it. The queue lists time in
> beats, not absolute. Set the alarm for the first event in the queue
> by computing the absolute time for it based on current tempo. When
> you reach it, do the same for the next event in the queue.
Some time ago I wrote a C++ code that work just like this with a generic
Event class. It uses absolute tempo instead of beats and nanosleep.
Abortion mechanism is included. If you want, I can send it to you.
BTW, I'm really interested in what you are doing.
Maurizio Umberto Puxeddu
This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:23:26 EST