[linux-audio-dev] Re: [CUD] Csound & ALSA support: a call for assistance

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

Subject: [linux-audio-dev] Re: [CUD] Csound & ALSA support: a call for assistance
From: Markus Gruber (gruber_AT_eikon.tum.de)
Date: Tue Sep 12 2000 - 15:06:02 EEST


dlphilp_AT_bright.net said:
> The unofficial Csound package includes Fred Floberg's code for
> supporting the ALSA drivers. The code enabled two soundcards to be
> used for separated i/o, but alas the code no longer works.

> The ALSA API has changed quite a bit since Fred's original work.
> I've made some of the necessary updates, and I can get it to compile,
> but Csound dies with the informative message "Input/output error" when
> I try to run it. ALSA OSS emulation works perfectly (i.e., if you
> don't select --with-ALSA as a configuration option).

I've hacked Fred Flobergs code to work with my ALSA installation, which is
0.5.8. I've tested both ALSA interfaces, the "block mode"
(ALSArtaudio-block.c) and "stream mode" (ALSArtaudio-stream.c), both with the
mode to start transfer, when data is written to the buffer.

I use "stream mode" ALSArtaudio-stream.c, because transfer starts immediately
without hearable latency, when data is written to the buffer, whereas with
"block mode" ALSArtaudio-block.c, sound comes from the speaker with a delay
approximately around half a second. Is this the right behaviour of block mode
with start_mode=SND_PCM_START_DATA ? Shouldn't transfer start after writing
the first fragment to the buffer. It seems that transfer starts, when the
whole buffer is filled, thus causing the latency.

With ALSArtaudio-stream.c I'm able to record sound, do some reverbs or
something like that on it and immediately play it back with very low latency
(I don't hear it).
This "stream mode" works well with my trident-4dwave-nx card. Using "stream
mode" with my ess solo1 card hangs up my machine, but block mode works with
rather low latency, because the transfer buffer is small :-)

Markus





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

This archive was generated by hypermail 2b28 : Tue Sep 12 2000 - 17:09:44 EEST