On 2010/09/26 10:23, Denis Krjuchkov <alcoh...@gmail.com> wrote:
> Let's say we have regular audio file (44100:16:2)
> We apply replain gain to it, this leads to losing some of precious audio 
> data bits.
> 
> Imaginary situation if we had such convert_before_dsp option:
> 
> We convert data to more precise format (like 44100:24:2).
> This is as simple as right shifting every sample to 8 bits.
> We apply replain gain to it.
> Some of the least significant bits are lost (we multiply on a 
> coefficient that is between 0 and 1),
> but we have 8 bits to spend.
> We lose either none of original audio data or at least less than we 
> could lose without such coversion.

I understand your problem, but most of the time, it's the other way
round: people have 24 bit audio (the libmad decoder emits 24 bit
audio!), and their sound hardware wants 16 bit.  Your change would do
the opposite, it would lose more precision.

What we need is better internal logic for conversion.  If you need 24
bit anyway, sure, convert to 24 bit as early as possible.  OTOH,
libsamplerate deals with floating point samples only...  It's not so
simple!

We could make a rule: make that two conversion plugins.  Never convert
"down" before the other filters, and never convert "up" after the
other filters.  This would get the best our of both cases.

Max


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to