Re: [ecasound] W64 format conversion correctness

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Sun May 29 2005 - 17:42:44 EEST


and sorry for the late response.

On Fri, 20 May 2005, Free Lunch wrote:

> I have been looking at using W64 to get around the 2 GB file limits
> when recording to WAV with ecasound. I would prefer to have automatic
> splits with WAV but don't think it is supported.

True, automatic splitting is not supported.

> I ran some tests converting an 8 MB CD format WAV file to W64 and back
> to WAV. I then compared the original and new WAV via phase inversion.
> The results were more noisy than I expected. Baudline reported around
> 15dB at low frequencies.
> I'm wondering why this conversion isn't perfect and whether it could be?

Before processing, ecasound converts all input data to its internal format
which is 32bit float atm. Now when you convert a wav-file to w64, ecasound
first converts from XXbit fixed integers to 32bit float, does the
processing, and feeds the result as 32bit floats to libsndfile which
creates the w64 file (and also does the necessary float->fixed

Neither ecasound or libsndfile supports dithering (although it is on
libsndfile's todo-file and will be utilized by ecasound also when ready),
so there can be some artifacts from the float->fixed down-conversion.

Now, but, but... if you don't perform any processing, just plain copy,
there shouldn't be any artifacts as the result should be
fixed(A)->float(B)->fixed(A). It's possible that some rounding/truncation
errors are created by differences in doing the fixed<->float conversion
between ecasound and libsndfile. You can work around this by using
libsndfile for all conversions:

ecasound -i sndfile,foo.wav -o bar.w64

... i.e. use libsndfile also for all wav-files.

PS And of course, using more bits per sample will help -- record
    to 32bit-floats if you are really paranoid. :)

  Audio software for Linux!
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit
Ecasound-list mailing list
Received on Sun May 29 20:15:13 2005

This archive was generated by hypermail 2.1.8 : Sun May 29 2005 - 20:15:14 EEST