summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-07-01 17:20:19 +0200
committerMax Kellermann <max@musicpd.org>2020-07-01 17:38:08 +0200
commit691b6a236ebc769f3d1aaa21ddc3a4c7ad9211be (patch)
tree0b9c648891bf1dd03c7968f9641010a9c518db9f /test
parent5c7243d3add84b0f11da0ebea558b31984b0a65f (diff)
output/osx: improve sample rate selection
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 40a1ebee295c569, 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
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions