Re: [linux-audio-dev] Sequencing+timers+DiskIO=ARGH

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

Subject: Re: [linux-audio-dev] Sequencing+timers+DiskIO=ARGH
From: Scott McNab (sdm_AT_fractalgraphics.com.au)
Date: Tue Jul 11 2000 - 09:23:17 EEST


Juan Rojo wrote:
>
> I'm currently writing a midi sequencing application. Due to the nature of it. I
> need to send the midi commands in the most realtime way i can. So i'm using
> SIGALARM every 10ms to trigger a player step and send the proper midi commands.
> This seems to work fine.. althought when there is some system load lags a
> little bit. Still i can give the program more priority and there's not any
> problem. BUT if i try to run it and via a loopback: midi out -> external midi
> device -> line in - I try to record what i do to disk (using xwave or gmurf) ..
> i get _ugly_ delays that mess up my playing entirely each time the audio
> recording application writes to disk.
>
> Is there any way i can fix this? Should I use a separate thread against a
> gettimeofday function instead SIGALARM? Any idea why the
> sound corrupts so much when sends sound to disk? or
> at least a sound recording application that wont kill my timer?

Sounds like you should be using the ALSA Sequencer API. That way the kernel is
responsible for delivering the events exactly on time and you avoid all these
scheduling issues. Not to mention that a lot of the event processing work is
already done for you by avoiding having to deal with midi at the byte level.

Scott


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

This archive was generated by hypermail 2b28 : Tue Jul 11 2000 - 09:56:38 EEST