From c9f7772198d67870e02c0f69e01ee1c75d53eb0a Mon Sep 17 00:00:00 2001 From: "Stephen F. Booth" Date: Sun, 17 Dec 2023 11:29:51 -0600 Subject: [PATCH] Use unsigned long for sampleFrames --- taglib/mpc/mpcproperties.cpp | 6 +++--- taglib/mpc/mpcproperties.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/taglib/mpc/mpcproperties.cpp b/taglib/mpc/mpcproperties.cpp index d29cccba..90959759 100644 --- a/taglib/mpc/mpcproperties.cpp +++ b/taglib/mpc/mpcproperties.cpp @@ -43,7 +43,7 @@ public: int sampleRate { 0 }; int channels { 0 }; unsigned int totalFrames { 0 }; - unsigned int sampleFrames { 0 }; + unsigned long sampleFrames { 0 }; int trackGain { 0 }; int trackPeak { 0 }; int albumGain { 0 }; @@ -101,7 +101,7 @@ unsigned int MPC::Properties::totalFrames() const return d->totalFrames; } -unsigned int MPC::Properties::sampleFrames() const +unsigned long MPC::Properties::sampleFrames() const { return d->sampleFrames; } @@ -225,7 +225,7 @@ void MPC::Properties::readSV8(File *file, offset_t streamLength) d->sampleRate = sftable[(flags >> 13) & 0x07]; d->channels = ((flags >> 4) & 0x0F) + 1; - const unsigned int frameCount = d->sampleFrames - begSilence; + const auto frameCount = d->sampleFrames - begSilence; if(frameCount > 0 && d->sampleRate > 0) { const double length = frameCount * 1000.0 / d->sampleRate; d->length = static_cast(length + 0.5); diff --git a/taglib/mpc/mpcproperties.h b/taglib/mpc/mpcproperties.h index f304a88c..2e098439 100644 --- a/taglib/mpc/mpcproperties.h +++ b/taglib/mpc/mpcproperties.h @@ -90,7 +90,7 @@ namespace TagLib { int mpcVersion() const; unsigned int totalFrames() const; - unsigned int sampleFrames() const; + unsigned long sampleFrames() const; /*! * Returns the track gain as an integer value,