[mythtv] [mythtv-commits] Ticket #4804: Add software amplification support to libmyth/AudioOutput
chamilton at cs.dal.ca
Tue Apr 15 11:53:30 UTC 2008
>> This doesn't affect the software amp patch itself, and there are
>> potentially other uses for it as well (evening out volume level on
>> different television channels, etc). Also, it would be trivial to add
>> per decoder default gain values using the software pre-amp patch. But
>> that only makes sense if there is some provable difference in the gain
>> when the same song is encoded using different encoders...
> this is true.
> however what you do lose is dynamic range/sound quality.
> the decoders convert floats to 16 bit ints in most cases and
> doing the scale before it does this conversion is much better.
Then perhaps the right approach is to make the software preamp available
in the audio output class, but to use the decoders native preamp if one
exists. Another possibility is to extend the AudioOutput class to
accept floating point input as well, and to make decoders use this when
access to the floating point data is available.
Regardless of the approach, I'm not convinced that the errors involved
in rounding before amplifying are significant; typical preamp values
(looking at the ReplayGain values across my collection of music) are
going to be within +/- 10 dB, so we're talking about errors of at most 2
units per 32,768, or an error of at most 0.006% per sample value.
However, since the higher precision approach can be relatively easily
accomodated, we may as well please the audiophiles ;)
More information about the mythtv-dev