]> granicus.if.org Git - taglib/commitdiff
divide by 1000 instead of 1024 when calculating riff bitrate to get standard 1411...
authorNick Shaforostoff <shafff@ukr.net>
Wed, 23 Feb 2011 08:58:17 +0000 (08:58 +0000)
committerNick Shaforostoff <shafff@ukr.net>
Wed, 23 Feb 2011 08:58:17 +0000 (08:58 +0000)
CCMAIL:taglib-devel@kde.org

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1222375 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

taglib/riff/aiff/aiffproperties.cpp
taglib/riff/wav/wavproperties.cpp

index 9da5b1d8813f54add5034a9529119b5a0b0dcf7b..77c3d2776077044bff8e44c7b858d916330e285a 100644 (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;
 }
index 07971a06484fea818ecdaefe1ce3256ae1be3f87..3721686058f2bfcbd706353fb27e47ac8e608e62 100644 (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;
 }