• Max Kellermann's avatar
    pcm/PcmDop: round down to the nearest multiple of 4 DSD bytes · a2340c31
    Max Kellermann authored
    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
    a06bf388
    
    Closes #233
    a2340c31
PcmDop.cxx 2.63 KB