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:
Nick Shaforostoff 2011-02-23 08:58:17 +00:00
parent f89c16cd65
commit d21ff8be54
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}