From alsa-user-owner@alsa.jcu.cz  Sun Jan 24 06:46:35 1999
Received: from m1_pn2.vsnl.net.in (m1_pn2.vsnl.net.in [202.54.10.17])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id GAA31524
	for <alsa-user@alsa.jcu.cz>; Sun, 24 Jan 1999 06:42:20 +0100
Received: from pentium200 ([202.54.10.92])
	by m1_pn2.vsnl.net.in (8.9.0/8.9.0) with SMTP id LAA27145
	for <alsa-user@alsa.jcu.cz>; Sun, 24 Jan 1999 11:12:33 +0530 (IST)
Message-ID: <000b01be08e3$3f3b4580$5c0a36ca@pentium200>
From: "Patanjali" <patanjali@mindless.com>
To: <alsa-user@alsa.jcu.cz>
Subject: problems with ALSA full duplex sound programming
Date: Thu, 5 Nov 1998 23:07:12 +0530
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Reply-To: alsa-user@alsa.jcu.cz
Sender: alsa-user-owner@alsa.jcu.cz
Precedence: list

I have a full duplex app running under ALSA using ALSA lib.
It is built along the lines of alsa-lib/test/latency.c
Is it necessary to keep checking the hardware
once the optimum fragment size has been obtained ... if so, how often?

The program works fine for some time ... then just stops giving any output
especially if i start something resource hungry like netscape, it does not
even
report that wrong number of bytes were read or written to the buffer.

Is this because i am not checking to the buffers each cycle : i feel thats
computationAally very expensive.

my algo currently is:
1. using the procedure followed in latency.c get the optimum fragment size
    for minimum latency
2. using this fragment size :
    a. record fragment
    b. play fragment
    c. repeat step 2

- is the above wrong ? i.e. must i keep polling the hardware every now and
then ?

- grateful for any help.

- patanjali



