-
Max Kellermann authored
The formula in osx_output_score_sample_rate() to detect multiples of the source sample rate was broken: when given a 44.1 kHz input file, it preferred 16 kHz over 48 kHz, because its `frac_portion(16)=0.75` is smaller than `frac_portion(48)=0.91`. That formula, introduced by commit 40a1ebee, looks completely wrong. It doesn't do what the code comment pretends it does. Instead of using that `frac_portion` to calculate a score, this patch adds to the score only if `frac_portion` is nearly `0` or `1`. This means that the factor is nearly integer. Closes https://github.com/MusicPlayerDaemon/MPD/issues/904
691b6a23
To find the state of this project's repository at the time of any of these versions, check out
the tags.