Subject: [ecasound] Re: [alsa-user] Dropped samples!!
From: Kai Vehmanen (email@example.com)
Date: Tue Oct 17 2000 - 02:51:15 EEST
On Mon, 16 Oct 2000, Lindsay Haisley wrote:
> I'm using ecasound to record material from CDs in real time, reading from
> /dev/dsp and writing to a wav file. I get occasional skips in the recorded
> file, apparently dropped samples which result in lost time, c.a. 200
> microseconds or so, and enough to ruin a music recording. As best I can
> determine, these dropouts are related in some way to other activity on the
> box since I seem to get more of them if I do other things on the box while
Uhm, this might be caused by disk activity. The real fix for this would be
to use large buffering to protect against disk i/o latency. Ecasound
already supports this (-z:db option), but unfortunately only for input and
for a limited set of file formats. A new buffering system is currently
under work. The next stable release of ecasound (1.8.something) will offer
a new double-buffered i/o layer, which will offer droppout-free processing
for all formats (about 40 supported formats at the moment).
But, but, as for your current situation, I suggest the following:
- increase the buffer (ie. fragment) size with
ecasound -b option (-b:4096 means 4096 sample frames per buffer)
- become the root user, and use ecasound's -r option;
this will run ecasound with SCHED_FIFO (realtime) priority and
thus improve performance
- kernel versions; you didn't mention what kernel version you
are using; I've experienced bad streaming performance
with certain 2.4.x kernels, but I admit this really shouldn't
affect low-bandwidth cases like this (only one track at a time)
> making the recording, but I haven't spotted the exact time of the dropouts
> to know more precisely what's going on when they happen.
And of course, you should check the always useful "Linux Sound Quality
HOWTO" at http://www.linuxdj.com/audio/quality/ ... it's definitely worth
> If I switch to the emu10k1 driver from opensource.creative.com the problem
> goes away and I have yet to hear a skip with this driver, so I believe the
> problem is related to the alsa driver.
This is indeed suspicious. Have you tried using ecasound with native ALSA
support... so something like "ecasound -i alsa,0,0 -o file.wav" - (read
input from ALSA card 0, device 0)?
-- . http://www.eca.cx ... [ audio software for linux ] /\ . . http://www.eca.cx/aivastus ... [ aivastus net radio ] /\ . . http://www.eca.cx/sculpscape [ my armchair-tunes mp3/ra/wav ]
-- To unsubscribe send message 'unsubscribe' in the body of the message to <firstname.lastname@example.org>.
This archive was generated by hypermail 2b28 : Tue Oct 17 2000 - 02:59:14 EEST