Re: [ecasound] problems with the loop device and changing formats

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] problems with the loop device and changing formats
From: Kai Vehmanen (k_AT_eca.cx)
Date: Wed Oct 31 2001 - 14:24:23 EET


On Wed, 31 Oct 2001, Jeremy Hall wrote:

> outputting to wav at a rate other than 44100 produces incorrect noises, as
> if ecasound is doing some crude rate calculation to 44100 then back to

If ecasound has to do resampling, it can degrade the signal quality. But
for this to happen, either input or output object must have a different
sample-rate than -sr:xxx. If all have the same rate, no resampling
should happen...

I tested the following:

ecasound -a:def -sr:48000 -i null -f:16,1,48000 -o test.wav -x -el:sine_fcac,880,1 -t:15
ecasound -a:def -sr:46500 -i null -f:16,1,46500 -o test2.wav -x -el:sine_fcac,880,1 -t:15

I was able to play both 'test.wav' and 'test2.wav' and audio output was
fine. File gives the following info:

test2.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 46500 Hz
test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 48000 Hz

> calculation because ecasound just doesn't do it right. Does ecasound use
> libsndfile for any of this rate calculation stuff?

No. Conversion from one sample-rate to another (resampling) is done
internally (... and with a simple, low-cost algorithm).

-- 
 http://www.eca.cx
 Audio software for Linux!

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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Oct 31 2001 - 14:19:27 EET