libmad mp3 distortions

Andriy Gapon avg at icyb.net.ua
Fri Sep 18 11:10:48 UTC 2009


on 17/09/2009 17:14 Alexander Leidinger said the following:
> Have you tried to play it with "madplay -v -a -6"? This will lower the
> volume by 6dB. IIRC this is still with the sound before the conversation
> to PCM. If this prevents the clipping, then it is normal. The reason is
> that because of rounding (and other operations) the value of a sample
> can be higher (or lower) than originally. If it was at the max level
> before, it can now exceed the max -> clipping. madplay is following the
> rules very strictly (and IIRC working with higher precision and
> bitsize), while other players have bigger mathematical errors. This
> would explain then, why you see this with madplay but not with other
> players. The problem I describe is not in the decoding step, the problem
> is at the encoding level.

Alexander,

thanks a lot! madplay -a -6 does indeed produce correct sound.
Bad news: despite the magnitude of configuratios options related to 'gain' and
'pre-amp' in audacious2 (all global, nothing specific to mad plugin), I couldn't
get it work the same way as madplay. Sound gets quieter but the distortions are
not fixed.


-- 
Andriy Gapon


More information about the freebsd-multimedia mailing list