]> granicus.if.org Git - taglib/commitdiff
Revert "A bit more accurate calculation of the AIFF audio length."
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Mon, 31 Aug 2015 07:20:58 +0000 (16:20 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Mon, 31 Aug 2015 07:20:58 +0000 (16:20 +0900)
This reverts commit 15a1505880d27f7d58f39a78946c05c6c6aa2bda.

taglib/riff/aiff/aiffproperties.cpp

index f074fae3365a45e7ddd3a33b6e836beb5621b170..e345fb0c098c1cc896424729b52a813fa41f56e4 100644 (file)
@@ -179,7 +179,7 @@ void RIFF::AIFF::Properties::read(File *file)
     d->sampleRate = static_cast<int>(sampleRate + 0.5);
 
   if(d->sampleFrames > 0 && d->sampleRate > 0) {
-    const double length = d->sampleFrames * 1000.0 / sampleRate;
+    const double length = d->sampleFrames * 1000.0 / d->sampleRate;
     d->length  = static_cast<int>(length + 0.5);
     d->bitrate = static_cast<int>(streamLength * 8.0 / length + 0.5);
   }