From alsa-user-owner@alsa.jcu.cz  Fri Jan 15 21:26:59 1999
Received: from entry.jcu.cz (IDENT:perex@entry.jcu.cz [160.217.1.111])
	by marvin.jcu.cz (8.9.1a/8.9.1) with SMTP id VAA09527;
	Fri, 15 Jan 1999 21:25:21 +0100
Date: Fri, 15 Jan 1999 21:25:20 +0100 (CET)
From: Jaroslav Kysela <perex@jcu.cz>
To: Patanjali <patanjali@mindless.com>
cc: alsa-user@alsa.jcu.cz
Subject: Re: full duplex programming
In-Reply-To: <010101be0239$74fd47a0$7c5036ca@pentium200>
Message-ID: <Pine.LNX.3.96.990115212336.20470A-100000@entry.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-user@alsa.jcu.cz
Sender: alsa-user-owner@alsa.jcu.cz
Precedence: list

On Wed, 28 Oct 1998, Patanjali wrote:

> I would like to do a program 
> which reads, processes and writes
> suond using the full duplex capabilities of 
> the SB 16 and my ALSA driver.
> 
> how do i go about it ?
> currently i am doing something like :
> while(1)
> {
>     read some bytes into buffer;
>     write same bytes into buffer; // write only number of bytes actually read
> }
> 
> this code doesn't seem to be giving me the right results.
> the sound input doesn't always appear at the output,
> also the quality is very bad.
> 
> is there any demo prog which does the above ?

Yes, look to alsa-lib/test/latency.c... Your algorithm is bad (playback
underruns)...

							Jaroslav

-----
Jaroslav Kysela <perex@jcu.cz>
Academic Computer Centre, University of South Bohemia
Branisovska 31, C. Budejovice, CZ-370 05 Czech Republic


