Rename internalFileType to fileType

This commit is contained in:
Stephen F. Booth 2024-12-09 09:43:20 -06:00
parent 8e5911a52a
commit ef5907445c
No known key found for this signature in database
GPG Key ID: 900AAC885063A183
5 changed files with 13 additions and 13 deletions

View File

@ -275,14 +275,14 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle)
// Set up variable length input
VariableLengthInput input{this};
// Read internal file type
uint32_t internalFileType;
if(!input.getUInt(internalFileType, version, fileTypeCodeSize)) {
debug("SHN::File::read() -- Unable to read internal file type.");
// Read file type
uint32_t fileType;
if(!input.getUInt(fileType, version, fileTypeCodeSize)) {
debug("SHN::File::read() -- Unable to read file type.");
setValid(false);
return;
}
props.internalFileType = static_cast<int>(internalFileType);
props.fileType = static_cast<int>(fileType);
// Read number of channels
uint32_t channelCount = 0;

View File

@ -40,7 +40,7 @@ public:
PropertiesPrivate &operator=(const PropertiesPrivate &) = delete;
int version { 0 };
int internalFileType { 0 };
int fileType { 0 };
int channelCount { 0 };
int sampleRate { 0 };
int bitsPerSample { 0 };
@ -57,7 +57,7 @@ SHN::Properties::Properties(const PropertyValues *values, ReadStyle style) :
{
if(values) {
d->version = values->version;
d->internalFileType = values->internalFileType;
d->fileType = values->fileType;
d->channelCount = values->channelCount;
d->sampleRate = values->sampleRate;
d->bitsPerSample = values->bitsPerSample;
@ -96,9 +96,9 @@ int SHN::Properties::shortenVersion() const
return d->version;
}
int SHN::Properties::internalFileType() const
int SHN::Properties::fileType() const
{
return d->internalFileType;
return d->fileType;
}
int SHN::Properties::bitsPerSample() const

View File

@ -52,8 +52,8 @@ namespace TagLib {
//! Returns the Shorten file version (1-3).
int shortenVersion() const;
//! Returns the Shorten internal file type.
int internalFileType() const;
//! Returns the Shorten file type.
int fileType() const;
int bitsPerSample() const;
unsigned long sampleFrames() const;

View File

@ -33,7 +33,7 @@ namespace TagLib {
struct PropertyValues
{
int version { 0 };
int internalFileType { 0 };
int fileType { 0 };
int channelCount { 0 };
int sampleRate { 0 };
int bitsPerSample { 0 };

View File

@ -31,7 +31,7 @@ public:
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate());
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->shortenVersion());
CPPUNIT_ASSERT_EQUAL(5, f.audioProperties()->internalFileType());
CPPUNIT_ASSERT_EQUAL(5, f.audioProperties()->fileType());
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample());
CPPUNIT_ASSERT_EQUAL(static_cast<unsigned long>(88200), f.audioProperties()->sampleFrames());
}