mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
divide by 1000 instead of 1024 when calculating riff bitrate to get standard 1411 kbps bitrate on AudioCD wavs
CCMAIL:taglib-devel@kde.org git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1222375 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
f89c16cd65
commit
d21ff8be54
@ -148,6 +148,6 @@ void RIFF::AIFF::Properties::read(const ByteVector &data)
|
||||
d->sampleWidth = data.mid(6, 2).toShort();
|
||||
double sampleRate = ConvertFromIeeeExtended(reinterpret_cast<unsigned char *>(data.mid(8, 10).data()));
|
||||
d->sampleRate = sampleRate;
|
||||
d->bitrate = (sampleRate * d->sampleWidth * d->channels) / 1024.0;
|
||||
d->bitrate = (sampleRate * d->sampleWidth * d->channels) / 1000.0;
|
||||
d->length = sampleFrames / d->sampleRate;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ void RIFF::WAV::Properties::read(const ByteVector &data)
|
||||
d->sampleWidth = data.mid(14, 2).toShort(false);
|
||||
|
||||
uint byteRate = data.mid(8, 4).toUInt(false);
|
||||
d->bitrate = byteRate * 8 / 1024;
|
||||
d->bitrate = byteRate * 8 / 1000;
|
||||
|
||||
d->length = byteRate > 0 ? d->streamLength / byteRate : 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user