kdesupport/taglib/taglib/riff
Nick Shaforostoff
shafff at ukr.net
Wed Feb 23 09:58:17 CET 2011
SVN commit 1222375 by shaforo:
divide by 1000 instead of 1024 when calculating riff bitrate to get standard 1411 kbps bitrate on AudioCD wavs
CCMAIL:taglib-devel at kde.org
M +1 -1 aiff/aiffproperties.cpp
M +1 -1 wav/wavproperties.cpp
--- trunk/kdesupport/taglib/taglib/riff/aiff/aiffproperties.cpp #1222374:1222375
@@ -148,6 +148,6 @@
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;
}
--- trunk/kdesupport/taglib/taglib/riff/wav/wavproperties.cpp #1222374:1222375
@@ -114,7 +114,7 @@
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;
}
More information about the taglib-devel
mailing list