[linux-audio-user] Latency with ALSA

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

Subject: [linux-audio-user] Latency with ALSA
From: Nick (nicktsocanos_AT_charter.net)
Date: Wed Apr 02 2003 - 06:57:28 EEST


I am writing audio applications that are real-time.
I had been using Port Audio which is really very good, even without root
priviledges, it does a very good job. I want to support other sound
drivers, in case someone doesn't have Port Audio or can't get it to
work.

I have just built my ALSA driver, it works ok, but I am getting terrible
latency problems and buffer underruns. The thing is it is a real-time
application, it must get audio to the card as soon as possible. Why is
it that OSS with Port Audio works so well, and my ALSA setup is
suffering?

Even if I set the frame rate higher (the number of frames to the card) I
still get buffer underruns. I am talking maybe 70 milliseconds now. This
is sad, because I know with DirectX I can get about 35 ms timing with it
on this machine.With ASIO I have done better than that.

Even running as root and scheduling the app to real-time priority (50) I
get buffer underruns. So, something must not be right with my setup.

I have tried setting the frames written to all sorts of latencies, and
it does reduce the drop outs, but I am still getting them. I tried
buffering the sound and dropping it in blocks, but it wasn't working
correctly. This is a bit disappointing so far.

Is there something I need to do to ALSA to get near real-time
performance from it? I have heard people mention patching their kernel
for low latency. I have Jack but I have not started working with it yet.
Should I dump ALSA and just go for Jack? Is there something I need to do
to my kernel to get better performance? I would get Planet CCRMA if it
supported my OS, but it doesn't, so I have to tweak my box manually.

Thanks

-- 
Nick <nicktsocanos_AT_charter.net>


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

This archive was generated by hypermail 2b28 : Wed Apr 02 2003 - 07:00:49 EEST