diff options
author | Max Kellermann <max@musicpd.org> | 2018-03-15 20:02:00 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-03-15 20:02:00 +0100 |
commit | a2340c313f49d45abf3ade4645264e45c54918c7 (patch) | |
tree | 9e15346eb370879646e79d713d0e051969101aac /src/player | |
parent | 37b07a5e7ca254fac74aa1f53c9b91f194e37d84 (diff) |
pcm/PcmDop: round down to the nearest multiple of 4 DSD bytes
There was a discrepancy between what was written to the buffer and the
size returned by pcm_dsd_to_dop(): the "for" loop uses num_frames/2,
rounding down, while the return value is num_samples which is
num_frames*channels, without rounding. This could cause undefined
data at the end of the destination buffer if the source buffer size
was not aligned to multiples of 8 bytes (4 DSD bytes per channel).
The latter however can occur in the 0.21 branch after commit
a06bf388d96
Closes #233
Diffstat (limited to 'src/player')
0 files changed, 0 insertions, 0 deletions