Re: [ecasound] hq-resampling with ecasound ( now what ? )

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Sun Aug 21 2005 - 17:09:06 EEST

On Mon, 20 Jun 2005, Kamil Wencel wrote:

> #> jackd -R -dalsa --device hw:1 --rate 96000 --playback --nperiods 8
>
> #> ecasound -B:rtlowlatency -b:128 -f:32,2,96000 -i
> resample-hq,44100,'audiofile.wav' -f:32,2,96000 -o jack
> #> ecasound -B:rtlowlatency -b:128 -f:32,2,96000 -i
> resample-hq,44100,'audiofile.wav' -f:32,2,96000 -o alsa,rme96
[...]
>
> But, as soon as I plug jack inbetween it took me hours to get any sound out
> of it. And when it finally did it sounded
> worse than the old broken ecasound upsampling. Instead of fine music you get
> your music again overlayed
> by noise and scratches.

Yes, there seems to be a problem. The resampler produces different size
blocks if the blocksize is not an integer multiple of the resampling ratio
(128/(96000/44100)), and jack output object can't handle this (not a
problem for alsa and file outputs). This problem becomes obvious when you
play with the jackd blocksize - try first with "-p 128" and then "-p
2048", and you will certainly hear the difference (note with jackd, you
need change jackd blocksize, ecasound's -b:xxx is always overridden by the
jackd system-wide blocksize).

OTOH, when resampling between the "easy ratios" (44100<->22050,
48000<->96000, etc), the output will be fine. But unfortunately
96000/44100 is not one of these cases. And just be sure, this problem only
affects JACK input/outputs.

I'll add a runtime warning about this problem to the CVS-tree. It's bad if
you get audible artifacts without any warnings.

To solve this problem, one would need to add an intermediate buffer to
the resampler, and thus add latency to the processing chain. Not
impossible, but trivial either --> to the todo-list.

--
  links, my public keys, etc at http://eca.cx/kv
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Sun Aug 21 20:15:07 2005

This archive was generated by hypermail 2.1.8 : Sun Aug 21 2005 - 20:15:08 EEST