tot_noise is currently calculated by adding noise values in dB.
I think it would be better to sum the energy of noise, i.e.
changing
    tot_noise += noise;
to
    tot_noise += pow (10.0, noise/10.0);
This makes -X2 and -X3 much more stable.
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to