[ecasound] about edi-15 (was: Re: [Alsa-user] xrun!!!) (fwd)

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: [ecasound] about edi-15 (was: Re: [Alsa-user] xrun!!!) (fwd)
From: Kai Vehmanen (kai.vehmanen@wakkanet.fi)
Date: Thu Sep 20 2001 - 15:00:54 EEST

This is precisely why I want to implement 'edi-15', ie.
"More intelligent system for selecting buffering modes
 and sizes for optimal out-of-the-box performance.".
To get acceptable recording performance, people shouldn't
need to give this many parameters to ecasound...

---------- Forwarded message ----------
Date: Thu, 20 Sep 2001 14:54:27 +0300 (EEST)
From: Kai Vehmanen <kai.vehmanen@wakkanet.fi>
To: Adam Wiggins <adam@dusk.org>
Cc: alsa-user@lists.sourceforge.net
Subject: Re: [Alsa-user] xrun!!!

On Thu, 20 Sep 2001, Adam Wiggins wrote:

> When recording via arecord I frequently see:
> xrun!!! (at least 12.096 ms long)

This is actually an underrun. While your computer is doing something else
(other programs, drivers, etc), soundcard's buffer area has become
full with recorded data. So as a result you get the an underrun
(no place to put more data, so previously recorded data is lost).

As a solution, you need a realtime-capable recording
application and double-buffering between the recording application
(arecord) and the pipe (here 'conv').

> arecord -D hw:1 -c 12 -r 96000 -f S32_LE -t raw | conv > out.raw

Download ecasound from http://eca.cx and then:

ecasound -r -z:db -sr:96000 -z:intbuf -f:s32_le,12,96000 -i alsa,hw:1 -o stdout | conv > out.raw

And run with root-priviledges. On average machine (no badly behaving
drivers, etc), this is rock-solid. As for the params:

-r = use realtime scheduling (SCHED_FIFO)
-z:db = double-buffered disk i/o
-sr:96000 = to avoid resampling, set internal sample rate to 96000
-f = set audio format for folloing inputs/outputs
-i = input definition
-o = output definition

> "conv" is a program I wrote that strips out the all but the first
> two channels, since I couldn't figure out any way to do such a thing
> with arecord or ALSA by itself.

Well, ok, no need for this...:

ecasound -r -z:db -z:intbuf -f:s32_le,12,96000 -i alsa,hw:1 -f:s32_le,2,96000 -o out.raw

... and ta-daa, a 2ch output file. :)

 Audio software for Linux!

-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request@wakkanet.fi>.

New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Sep 20 2001 - 14:59:31 EEST