kdesupport/taglib/taglib/riff

Lukáš Lalinský lalinsky at gmail.com
Wed Feb 23 10:18:38 CET 2011


Thanks for this change, we don't use 1024 anywhere else, so this make
sense, but please also run the test suite when committing to SVN. This
particular change breaks one test, which needs to be updated:

test_aiff.cpp:26:Assertion
Test name: TestAIFF::testReading
equality assertion failed
- Expected: 689
- Actual  : 705

Lukas

On Wed, Feb 23, 2011 at 9:58 AM, Nick Shaforostoff <shafff at ukr.net> wrote:
> 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;
>  }
> _______________________________________________
> taglib-devel mailing list
> taglib-devel at kde.org
> https://mail.kde.org/mailman/listinfo/taglib-devel
>


More information about the taglib-devel mailing list