Re: [ecasound] Alsa input sample rate puzzle

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Fri Jun 20 2008 - 01:07:08 EEST


On Tue, 17 Jun 2008, Andrew Lees wrote:

> trying ecasound. I have a slight puzzle though. I am using an Audigy
> NX external USB card, and other recording software (arecord, audacity,
> for example) seem to think that the card supports an input side sample
> rate of 48000 s/s, but not 44100, while ecasound thinks it supports a
> 44100 rate but not 48000. Both camps are set in their ways, and will
> ecasound -f:s24_le,2,44100 -i:alsahw,1,0 -t:1800 -ge:5,0.02 -B:nonrt -o
> side2-2.wav (currently lockup are making me wary about rt modes)
> whereas ecasound -f:s24_le,2,48000 -i:alsahw,1,0 ... will not work.

that would suggest the card natively supports only 44100. Arecord should
behave similarly if you pass it:

arecord -D hw:1,0 ...

If you use the ALSA plugin layer (arecord without extra options, or
ecasound with "-i:plughw:1,0"), alsa-lib will resample the audio for you.
But usually (and especially when recording) it's better to record in the
native sample rate supported by HW (so 44100 in this case).

> Also arecord requires a -f S24_3LE option rather than a -f S24_LE option
> (which it says is not supported), while ecasound will not work with a
> -f:s24_3le, option - all very curious.

Yes, ecasound does not recognize '-f:s24_3le'. This is quite complicated
in fact... if you use the ALSA plug layer (-i:plughw:1,0 or arecord -D
plughw:1,0), alsa-lib will make the conversion for you, but otherwise you
need to understand what is going on. Basicly ALSA's S24_3LE is same as
ecasound's '-f:s24_le'. ALSA's S24_LE is in fact a 32bit sample, with
least-significant byte zeroed (so 24bit of information, stored in 32bits).
The latter one is much more common. In ecasound, you can use '-f:s32_le'
for both ALSA types S24_LE and S32_LE (because ecasound doesn't care
whether the lower bits are zeroed out or have valid info).

Check out the new Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
Ecasound-list mailing list
Received on Fri Jun 20 04:15:02 2008

This archive was generated by hypermail 2.1.8 : Fri Jun 20 2008 - 04:15:03 EEST