Re: [linux-audio-user] sound recording application

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: A list for linux audio users <linux-audio-user@...>
Date: Monday, September 11, 2006 - 6:40 pm

Hi,

On Sat, 9 Sep 2006, Maarten de Boer wrote:

> Could you explain what you mean with "much less reliable" ?

arecord (and most other tools mentioned in this thread) do not separate
disk i/o from audio i/o. Thus if disk i/o blocks for longer than the size
of audio i/o buffering, you'll get an xrun (= a break in the recording in
this case).

How big of an issue this is depends on your kernel, disk i/o subsystem,
and the amount of audio buffering used (which again depends on the driver,
soundcard hw and the sampling parameters). Many soundcards (but not all!)
allow to use quite big buffers, so in practise arecord et al will work
without glitches (especially for low-bandwidth usage like recording one or
two channels of CD-quality audio).

Ecasound (as do many other apps, such as ardour, linuxsampler, etc),
protect the audio i/o loop with multiple seconds of disk i/o buffering,
thus they are able to guarantee reliable audio i/o even in extreme
conditions (minimal audio i/o buffering to minimize latency + heavy system
load).

And then a separate issue is rt-scheduling. This is another safety measure
to protect the audio i/o loop against badly behaving other processes.

Couple of old links about this "why ecasound for recording" topic
(btw; note the years, I've been repeating these things for over 5 years now! ;)):

http://eca.cx/ecasound-list/2001/06/0016.html
http://eca.cx/ecasound-list/2005/04/0038.html

> I have never used ecasound, and since I often use arecord and oggenc

Sure, I use arecord a lot myself, too. Due to high visibility of ALSA, I
think aplay/arecord have become the de facto applications for these tasks,
so it probably makes more sense to focus energy on improving these tools
than to market other options. But there might not be a huge need for
change the tools, as mentioned earlier, with current kernels, and the
common use cases (low-bandwidth recording/playback), arecord/aplay may be
already good enough for most people.

> arecord -f cd -d 14400 | oggenc -q 6 -o 4hours.ogg -

Btw, you can of course use ecasound for this as well:

ecasound -f:16,2,44100 -t:14400 -r -i alsa -o stdout |oggenc -q 6 -o 4hours.ogg -

... plus you get separate buffering for the pipe (blocking on the oggenc
pipe won't interfere with the recording process) and benefits of
real-time scheduling (-r).

--
links, my public keys, etc at http://eca.cx/kv

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[linux-audio-user] sound recording application, Josh Lawrence, (Thu Sep 7, 1:50 pm)
Re: [linux-audio-user] sound recording application, Lee Revell, (Thu Sep 7, 4:57 pm)
Re: [linux-audio-user] sound recording application, Paul Davis, (Thu Sep 7, 7:40 pm)
Re: [linux-audio-user] sound recording application, glauber alex dias prado, (Fri Sep 8, 5:18 am)
Re: [linux-audio-user] sound recording application, Frank Barknecht, (Fri Sep 8, 12:35 pm)
Re: [linux-audio-user] sound recording application, Maarten de Boer, (Fri Sep 8, 11:57 pm)
Re: [linux-audio-user] sound recording application, Kai Vehmanen, (Mon Sep 11, 6:40 pm)
Re: [linux-audio-user] sound recording application, Maarten de Boer, (Tue Sep 12, 8:40 am)
Re: [linux-audio-user] sound recording application, Janina Sajka, (Thu Sep 14, 2:41 pm)
Re: [linux-audio-user] sound recording application, Frank Barknecht, (Sat Sep 9, 1:45 pm)
Re: [linux-audio-user] sound recording application, Kai Vehmanen, (Mon Sep 11, 6:00 pm)
Re: [linux-audio-user] sound recording application, Lee Revell, (Sat Sep 9, 5:26 pm)
Re: [linux-audio-user] sound recording application, Dave Phillips, (Fri Sep 8, 2:07 pm)
Re: [linux-audio-user] sound recording application, Adam Sampson, (Sat Sep 9, 1:59 am)
Re: [linux-audio-user] sound recording application, Maarten de Boer, (Fri Sep 8, 7:41 am)
Re: [linux-audio-user] sound recording application, Johannes Mario Ringheim, (Thu Sep 7, 2:43 pm)
Re: [linux-audio-user] sound recording application, Josh Lawrence, (Thu Sep 7, 3:09 pm)
Re: [linux-audio-user] sound recording application, David Causse, (Thu Sep 7, 2:21 pm)
Re: [linux-audio-user] sound recording application, Stephen Cameron, (Thu Sep 7, 2:08 pm)
Re: [linux-audio-user] sound recording application, Frank Barknecht, (Thu Sep 7, 2:40 pm)