Fix minor bytes-to-samples round error in some IMA formats

This commit is contained in:
bnnm 2017-12-24 01:31:43 +01:00
parent 74f80318c1
commit bf31573204

View File

@ -792,7 +792,7 @@ size_t ms_ima_bytes_to_samples(size_t bytes, int block_align, int channels) {
size_t ima_bytes_to_samples(size_t bytes, int channels) {
/* 2 samples per byte (2 nibbles) in stereo or mono config */
return bytes / channels * 2;
return bytes * 2 / channels;
}
size_t ubi_ima_bytes_to_samples(size_t bytes, int channels, STREAMFILE *streamFile, off_t offset) {