Package list squeezelite / c71ee71
handle dsf file with odd samples when playing dop Adrian Smith 7 years ago
1 changed file(s) with 9 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
248248
249249 frames = min(bytes, d->sample_bytes) / bytes_per_frame;
250250 if (frames == 0) {
251 // /2 for dop should never result in 0 as header len is always even
252 LOG_WARN("frames got to zero");
253 return DECODE_ERROR;
251 if (dop && d->sample_bytes == 1 && bytes >= 2) {
252 // 1 byte left add a byte of silence and play
253 *(iptrl + 1) = *(iptrr + 1) = 0x69;
254 frames = 1;
255 } else {
256 // should not get here due to wrapping m/2 for dop should never result in 0 as header len is always even
257 LOG_INFO("frames got to zero");
258 return DECODE_COMPLETE;
259 }
254260 }
255261
256262 frames = min(frames, out);