[mythtv] [mythtv-commits] Ticket #1104: multichannelaudio support

Mark Spieth mark at dclabs.com.au
Tue Jan 1 21:57:55 UTC 2008


> But, I'm seeing the same clipping/conversion-clicking issue that I saw
> in TV, in mythmusic. TV is still fine. It's the centre channel only
> again, and seems to happen on any album I pick.
>
> Any ideas?

does the same clipping happen in 2ch mode?
I had an issue with mad (mp3) in that the audio was distorted (clipped) but 
no clicking.
I think it got introduced with the latest upgrade of libmad but not sure.
I saw it in the stereo wave visualization where the waves went all the way 
peak to peak with rounding of the peaks which provided the clue.

my fix was the following. note it shouldnt be happening but this is where 
the clipping occurs.

mark

--- maddecoder.cpp      (revision 15263)
+++ maddecoder.cpp      (working copy)
@@ -448,6 +448,7 @@
 static inline signed long fix_sample(unsigned int bits, mad_fixed_t sample)
 {
     mad_fixed_t quantized, check;
+    sample >>= 1;   // MRS fudge for clipping problem
     quantized = sample;
     check = (sample >> MAD_F_FRACBITS) + 1;
     if (check & ~1) {



More information about the mythtv-dev mailing list