mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Correctly handle non-integral bit depths
This commit is contained in:
parent
d904281c6b
commit
7b3f279294
@ -125,5 +125,5 @@ void RIFF::WAV::Properties::read(const ByteVector &data)
|
||||
|
||||
d->length = byteRate > 0 ? d->streamLength / byteRate : 0;
|
||||
if(d->channels > 0 && d->sampleWidth > 0)
|
||||
d->sampleFrames = d->streamLength / (d->channels * (d->sampleWidth / 8));
|
||||
d->sampleFrames = d->streamLength / (d->channels * ((d->sampleWidth + 7) / 8));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user