mirror of
https://github.com/taglib/taglib.git
synced 2026-02-14 04:03:04 -05:00
Use a standard type rather than TagLib::uint.
This won't break the ABI compatibility.
This commit is contained in:
@ -65,13 +65,13 @@ public:
|
||||
}
|
||||
|
||||
long APELocation;
|
||||
uint APESize;
|
||||
unsigned int APESize;
|
||||
|
||||
long ID3v1Location;
|
||||
|
||||
ID3v2::Header *ID3v2Header;
|
||||
long ID3v2Location;
|
||||
uint ID3v2Size;
|
||||
unsigned int ID3v2Size;
|
||||
|
||||
TagUnion tag;
|
||||
|
||||
|
||||
@ -49,18 +49,18 @@ public:
|
||||
albumGain(0),
|
||||
albumPeak(0) {}
|
||||
|
||||
int version;
|
||||
int length;
|
||||
int bitrate;
|
||||
int sampleRate;
|
||||
int channels;
|
||||
uint totalFrames;
|
||||
uint sampleFrames;
|
||||
uint trackGain;
|
||||
uint trackPeak;
|
||||
uint albumGain;
|
||||
uint albumPeak;
|
||||
String flags;
|
||||
int version;
|
||||
int length;
|
||||
int bitrate;
|
||||
int sampleRate;
|
||||
int channels;
|
||||
unsigned int totalFrames;
|
||||
unsigned int sampleFrames;
|
||||
unsigned int trackGain;
|
||||
unsigned int trackPeak;
|
||||
unsigned int albumGain;
|
||||
unsigned int albumPeak;
|
||||
String flags;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -129,12 +129,12 @@ int MPC::Properties::mpcVersion() const
|
||||
return d->version;
|
||||
}
|
||||
|
||||
TagLib::uint MPC::Properties::totalFrames() const
|
||||
unsigned int MPC::Properties::totalFrames() const
|
||||
{
|
||||
return d->totalFrames;
|
||||
}
|
||||
|
||||
TagLib::uint MPC::Properties::sampleFrames() const
|
||||
unsigned int MPC::Properties::sampleFrames() const
|
||||
{
|
||||
return d->sampleFrames;
|
||||
}
|
||||
@ -165,7 +165,7 @@ int MPC::Properties::albumPeak() const
|
||||
|
||||
namespace
|
||||
{
|
||||
unsigned long readSize(File *file, TagLib::uint &sizeLength, bool &eof)
|
||||
unsigned long readSize(File *file, unsigned int &sizeLength, bool &eof)
|
||||
{
|
||||
sizeLength = 0;
|
||||
eof = false;
|
||||
@ -187,7 +187,7 @@ namespace
|
||||
return size;
|
||||
}
|
||||
|
||||
unsigned long readSize(const ByteVector &data, TagLib::uint &pos)
|
||||
unsigned long readSize(const ByteVector &data, unsigned int &pos)
|
||||
{
|
||||
unsigned char tmp;
|
||||
unsigned long size = 0;
|
||||
@ -211,7 +211,7 @@ void MPC::Properties::readSV8(File *file, long streamLength)
|
||||
while(!readSH && !readRG) {
|
||||
const ByteVector packetType = file->readBlock(2);
|
||||
|
||||
uint packetSizeLength;
|
||||
unsigned int packetSizeLength;
|
||||
bool eof;
|
||||
const unsigned long packetSize = readSize(file, packetSizeLength, eof);
|
||||
if(eof) {
|
||||
@ -238,7 +238,7 @@ void MPC::Properties::readSV8(File *file, long streamLength)
|
||||
|
||||
readSH = true;
|
||||
|
||||
TagLib::uint pos = 4;
|
||||
unsigned int pos = 4;
|
||||
d->version = data[pos];
|
||||
pos += 1;
|
||||
d->sampleFrames = readSize(data, pos);
|
||||
@ -259,7 +259,7 @@ void MPC::Properties::readSV8(File *file, long streamLength)
|
||||
d->sampleRate = sftable[(flags >> 13) & 0x07];
|
||||
d->channels = ((flags >> 4) & 0x0F) + 1;
|
||||
|
||||
const uint frameCount = d->sampleFrames - begSilence;
|
||||
const unsigned int frameCount = d->sampleFrames - begSilence;
|
||||
if(frameCount > 0 && d->sampleRate > 0) {
|
||||
const double length = frameCount * 1000.0 / d->sampleRate;
|
||||
d->length = static_cast<int>(length + 0.5);
|
||||
@ -305,11 +305,11 @@ void MPC::Properties::readSV7(const ByteVector &data, long streamLength)
|
||||
|
||||
d->totalFrames = data.toUInt(4, false);
|
||||
|
||||
const uint flags = data.toUInt(8, false);
|
||||
const unsigned int flags = data.toUInt(8, false);
|
||||
d->sampleRate = sftable[(flags >> 16) & 0x03];
|
||||
d->channels = 2;
|
||||
|
||||
const uint gapless = data.toUInt(5, false);
|
||||
const unsigned int gapless = data.toUInt(5, false);
|
||||
|
||||
d->trackGain = data.toShort(14, false);
|
||||
d->trackPeak = data.toShort(12, false);
|
||||
@ -337,14 +337,14 @@ void MPC::Properties::readSV7(const ByteVector &data, long streamLength)
|
||||
|
||||
bool trueGapless = (gapless >> 31) & 0x0001;
|
||||
if(trueGapless) {
|
||||
uint lastFrameSamples = (gapless >> 20) & 0x07FF;
|
||||
unsigned int lastFrameSamples = (gapless >> 20) & 0x07FF;
|
||||
d->sampleFrames = d->totalFrames * 1152 - lastFrameSamples;
|
||||
}
|
||||
else
|
||||
d->sampleFrames = d->totalFrames * 1152 - 576;
|
||||
}
|
||||
else {
|
||||
const uint headerData = data.toUInt(0, false);
|
||||
const unsigned int headerData = data.toUInt(0, false);
|
||||
|
||||
d->bitrate = (headerData >> 23) & 0x01ff;
|
||||
d->version = (headerData >> 11) & 0x03ff;
|
||||
|
||||
@ -35,7 +35,7 @@ namespace TagLib {
|
||||
|
||||
class File;
|
||||
|
||||
static const uint HeaderSize = 8*7;
|
||||
static const unsigned int HeaderSize = 8 * 7;
|
||||
|
||||
//! An implementation of audio property reading for MPC
|
||||
|
||||
@ -113,8 +113,8 @@ namespace TagLib {
|
||||
*/
|
||||
int mpcVersion() const;
|
||||
|
||||
uint totalFrames() const;
|
||||
uint sampleFrames() const;
|
||||
unsigned int totalFrames() const;
|
||||
unsigned int sampleFrames() const;
|
||||
|
||||
/*!
|
||||
* Returns the track gain as an integer value,
|
||||
|
||||
Reference in New Issue
Block a user