[linux-audio-dev] Re: [alsa-devel] 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: [alsa-devel] Re: [CUD] Csound & ALSA support: a call for assistance
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Tue Sep 12 2000 - 16:46:08 EEST


[ Markus - please fix your mailer so that it sends regular ASCII text
  instead of a bunch of encoded stuff ]

>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 withthe 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=3DSND_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.

there are a number of ways of fixing this.

my favorite method is to fill the buffer with silence, then start it
via SND_PCM_START_GO and an explicit start call.

fragment mode (as it is called in 0.6.0) is much more efficient than
frame mode, but the cost of stream mode may not be an issue in what
you're doing.

--p


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:34:37 EEST