>The problem: the MIDI and audio start synced up, but after a while they >start to drift further and further apart. I've checked my stuff >exaustively to make sure that it's not the fault of my program, so I'm >figuring it is caused by me not setting up something properly in alsa to >make the two streams synced up.
you either have to force the sequencer queue to use the PCM device as a clock, or you have to use the RTC as the clock for both (which will cause audio glitches every so often since it drifts w.r.t. the audio clock). you can't expect this to "just work" - you've created a system with two clocks (the sequencer queue and the PCM device), and such systems will never stay in sync. this is a very tricky area of linux audio/MIDI programming, and my personal advice would be to use kernel 2.5/2.6 or the backport of the hi-res timers code. you can then get usec-accurate scheduling of events (in SCHED_FIFO tasks, anyway) and forget the ALSA queue. hopefully, the ALSA sequencer will at some point take advantage of the new timers. even so, its still not a simple thing to do. --p ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel