diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt index 0f90a6b5..c97841c4 100644 --- a/bindings/c/CMakeLists.txt +++ b/bindings/c/CMakeLists.txt @@ -25,7 +25,7 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/opus ${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/dsf ${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/dsdiff - ${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/shn + ${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/shorten ) set(tag_c_HDRS tag_c.h) diff --git a/bindings/c/tag_c.cpp b/bindings/c/tag_c.cpp index 8fc14d67..10b749a4 100644 --- a/bindings/c/tag_c.cpp +++ b/bindings/c/tag_c.cpp @@ -55,7 +55,7 @@ #include "opusfile.h" #include "dsffile.h" #include "dsdifffile.h" -#include "shnfile.h" +#include "shortenfile.h" #include "tag.h" #include "id3v2framefactory.h" @@ -191,8 +191,8 @@ TagLib_File *taglib_file_new_type(const char *filename, TagLib_File_Type type) case TagLib_File_DSDIFF: file = new DSDIFF::File(filename); break; - case TagLib_File_SHN: - file = new SHN::File(filename); + case TagLib_File_SHORTEN: + file = new Shorten::File(filename); break; default: break; diff --git a/bindings/c/tag_c.h b/bindings/c/tag_c.h index 8d154bde..fc6b7acc 100644 --- a/bindings/c/tag_c.h +++ b/bindings/c/tag_c.h @@ -131,7 +131,7 @@ typedef enum { TagLib_File_Opus, TagLib_File_DSF, TagLib_File_DSDIFF, - TagLib_File_SHN + TagLib_File_SHORTEN } TagLib_File_Type; /*! diff --git a/taglib/CMakeLists.txt b/taglib/CMakeLists.txt index 668632f8..aa6cf327 100644 --- a/taglib/CMakeLists.txt +++ b/taglib/CMakeLists.txt @@ -26,7 +26,7 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/xm ${CMAKE_CURRENT_SOURCE_DIR}/dsf ${CMAKE_CURRENT_SOURCE_DIR}/dsdiff - ${CMAKE_CURRENT_SOURCE_DIR}/shn + ${CMAKE_CURRENT_SOURCE_DIR}/shorten ) set(tag_HDRS @@ -142,9 +142,9 @@ set(tag_HDRS dsdiff/dsdifffile.h dsdiff/dsdiffproperties.h dsdiff/dsdiffdiintag.h - shn/shnfile.h - shn/shnproperties.h - shn/shntag.h + shorten/shortenfile.h + shorten/shortenproperties.h + shorten/shortentag.h ) set(mpeg_SRCS @@ -312,10 +312,10 @@ set(dsdiff_SRCS dsdiff/dsdiffdiintag.cpp ) -set(shn_SRCS - shn/shnfile.cpp - shn/shnproperties.cpp - shn/shntag.cpp +set(shorten_SRCS + shorten/shortenfile.cpp + shorten/shortenproperties.cpp + shorten/shortentag.cpp ) set(toolkit_SRCS @@ -341,7 +341,7 @@ set(tag_LIB_SRCS ${vorbis_SRCS} ${oggflacs_SRCS} ${mpc_SRCS} ${ape_SRCS} ${toolkit_SRCS} ${flacs_SRCS} ${wavpack_SRCS} ${speex_SRCS} ${trueaudio_SRCS} ${riff_SRCS} ${aiff_SRCS} ${wav_SRCS} ${asf_SRCS} ${mp4_SRCS} ${mod_SRCS} ${s3m_SRCS} ${it_SRCS} ${xm_SRCS} ${opus_SRCS} - ${dsf_SRCS} ${dsdiff_SRCS} ${shn_SRCS} + ${dsf_SRCS} ${dsdiff_SRCS} ${shorten_SRCS} tag.cpp tagunion.cpp fileref.cpp diff --git a/taglib/fileref.cpp b/taglib/fileref.cpp index 2ef8237d..95cc1a3e 100644 --- a/taglib/fileref.cpp +++ b/taglib/fileref.cpp @@ -57,7 +57,7 @@ #include "xmfile.h" #include "dsffile.h" #include "dsdifffile.h" -#include "shnfile.h" +#include "shortenfile.h" using namespace TagLib; @@ -182,7 +182,7 @@ namespace else if(ext == "DFF" || ext == "DSDIFF") file = new DSDIFF::File(stream, readAudioProperties, audioPropertiesStyle); else if(ext == "SHN") - file = new SHN::File(stream, readAudioProperties, audioPropertiesStyle); + file = new Shorten::File(stream, readAudioProperties, audioPropertiesStyle); // if file is not valid, leave it to content-based detection. @@ -234,8 +234,8 @@ namespace file = new DSF::File(stream, readAudioProperties, audioPropertiesStyle); else if(DSDIFF::File::isSupported(stream)) file = new DSDIFF::File(stream, readAudioProperties, audioPropertiesStyle); - else if(SHN::File::isSupported(stream)) - file = new SHN::File(stream, readAudioProperties, audioPropertiesStyle); + else if(Shorten::File::isSupported(stream)) + file = new Shorten::File(stream, readAudioProperties, audioPropertiesStyle); // isSupported() only does a quick check, so double check the file here. diff --git a/taglib/shn/shnfile.cpp b/taglib/shorten/shortenfile.cpp similarity index 85% rename from taglib/shn/shnfile.cpp rename to taglib/shorten/shortenfile.cpp index 32b51f59..850708e4 100644 --- a/taglib/shn/shnfile.cpp +++ b/taglib/shorten/shortenfile.cpp @@ -23,11 +23,11 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include "shnfile.h" +#include "shortenfile.h" #include -#include "shnutils.h" +#include "shortenutils.h" #include "tdebug.h" #include "tutils.h" @@ -176,7 +176,7 @@ namespace { } } // namespace -class SHN::File::FilePrivate +class Shorten::File::FilePrivate { public: FilePrivate() = default; @@ -189,14 +189,14 @@ public: std::unique_ptr tag; }; -bool SHN::File::isSupported(IOStream *stream) +bool Shorten::File::isSupported(IOStream *stream) { // A Shorten file has to start with "ajkg" const ByteVector id = Utils::readHeader(stream, 4, false); return id.startsWith("ajkg"); } -SHN::File::File(FileName file, bool readProperties, +Shorten::File::File(FileName file, bool readProperties, AudioProperties::ReadStyle propertiesStyle) : TagLib::File(file), d(std::make_unique()) @@ -205,7 +205,7 @@ SHN::File::File(FileName file, bool readProperties, read(propertiesStyle); } -SHN::File::File(IOStream *stream, bool readProperties, +Shorten::File::File(IOStream *stream, bool readProperties, AudioProperties::ReadStyle propertiesStyle) : TagLib::File(stream), d(std::make_unique()) @@ -214,40 +214,40 @@ SHN::File::File(IOStream *stream, bool readProperties, read(propertiesStyle); } -SHN::File::~File() = default; +Shorten::File::~File() = default; -SHN::Tag *SHN::File::tag() const +Shorten::Tag *Shorten::File::tag() const { return d->tag.get(); } -PropertyMap SHN::File::properties() const +PropertyMap Shorten::File::properties() const { return d->tag->properties(); } -PropertyMap SHN::File::setProperties(const PropertyMap &properties) +PropertyMap Shorten::File::setProperties(const PropertyMap &properties) { return d->tag->setProperties(properties); } -SHN::Properties *SHN::File::audioProperties() const +Shorten::Properties *Shorten::File::audioProperties() const { return d->properties.get(); } -bool SHN::File::save() +bool Shorten::File::save() { if(readOnly()) { - debug("SHN::File::save() - Cannot save to a read only file."); + debug("Shorten::File::save() - Cannot save to a read only file."); return false; } - debug("SHN::File::save() - Saving not supported."); + debug("Shorten::File::save() - Saving not supported."); return false; } -void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) +void Shorten::File::read(AudioProperties::ReadStyle propertiesStyle) { if(!isOpen()) return; @@ -255,7 +255,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) // Read magic number auto magic = readBlock(4); if(magic != "ajkg") { - debug("SHN::File::read() -- Not a Shorten file."); + debug("Shorten::File::read() -- Not a Shorten file."); setValid(false); return; } @@ -265,7 +265,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) // Read file version int version = readBlock(1).toUInt(); if(version < minSupportedVersion || version > maxSupportedVersion) { - debug("SHN::File::read() -- Unsupported version."); + debug("Shorten::File::read() -- Unsupported version."); setValid(false); return; } @@ -277,7 +277,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) // Read file type uint32_t fileType; if(!input.getUInt(fileType, version, fileTypeCodeSize)) { - debug("SHN::File::read() -- Unable to read file type."); + debug("Shorten::File::read() -- Unable to read file type."); setValid(false); return; } @@ -287,7 +287,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) uint32_t channelCount = 0; if(!input.getUInt(channelCount, version, channelCountCodeSize) || channelCount == 0 || channelCount > maxChannelCount) { - debug("SHN::File::read() -- Invalid or unsupported channel count."); + debug("Shorten::File::read() -- Invalid or unsupported channel count."); setValid(false); return; } @@ -299,21 +299,21 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) if(!input.getUInt(blockSize, version, static_cast(std::log2(defaultBlockSize))) || blockSize == 0 || blockSize > maxBlockSize) { - debug("SHN::File::read() -- Invalid or unsupported block size."); + debug("Shorten::File::read() -- Invalid or unsupported block size."); setValid(false); return; } uint32_t maxnlpc = 0; if(!input.getUInt(maxnlpc, version, lpcqCodeSize) /*|| maxnlpc > 1024*/) { - debug("SHN::File::read() -- Invalid maximum nlpc."); + debug("Shorten::File::read() -- Invalid maximum nlpc."); setValid(false); return; } uint32_t nmean = 0; if(!input.getUInt(nmean, version, 0) /*|| nmean > 32768*/) { - debug("SHN::File::read() -- Invalid nmean."); + debug("Shorten::File::read() -- Invalid nmean."); setValid(false); return; } @@ -338,7 +338,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) int32_t function; if(!input.getRiceGolombCode(function, functionCodeSize) || function != functionVerbatim) { - debug("SHN::File::read() -- Missing initial verbatim section."); + debug("Shorten::File::read() -- Missing initial verbatim section."); setValid(false); return; } @@ -346,7 +346,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) int32_t header_size; if(!input.getRiceGolombCode(header_size, verbatimChunkSizeCodeSize) || header_size < canonicalHeaderSize || header_size > verbatimChunkMaxSize) { - debug("SHN::File::read() -- Incorrect header size."); + debug("Shorten::File::read() -- Incorrect header size."); setValid(false); return; } @@ -357,7 +357,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) for(int32_t i = 0; i < header_size; ++i) { int32_t byte; if(!input.getRiceGolombCode(byte, verbatimByteCodeSize)) { - debug("SHN::File::read() -- Unable to read header."); + debug("Shorten::File::read() -- Unable to read header."); setValid(false); return; } @@ -379,7 +379,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) chunkID = chunkData.toUInt(offset, true); offset += 4; if(chunkID != 0x57415645 /*'WAVE'*/) { - debug("SHN::File::read() -- Missing 'WAVE' in 'RIFF' chunk."); + debug("Shorten::File::read() -- Missing 'WAVE' in 'RIFF' chunk."); setValid(false); return; } @@ -399,7 +399,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) case 0x666d7420 /*'fmt '*/: { if(chunkSize < 16) { - debug("SHN::File::read() -- 'fmt ' chunk is too small."); + debug("Shorten::File::read() -- 'fmt ' chunk is too small."); setValid(false); return; } @@ -407,7 +407,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) int formatTag = chunkData.toUShort(offset, false); offset += 2; if(formatTag != waveFormatPCMTag) { - debug("SHN::File::read() -- Unsupported WAVE format tag."); + debug("Shorten::File::read() -- Unsupported WAVE format tag."); setValid(false); return; } @@ -415,7 +415,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) int fmtChannelCount = chunkData.toUShort(offset, false); offset += 2; if(props.channelCount != fmtChannelCount) - debug("SHN::File::read() -- Channel count mismatch between Shorten and 'fmt ' chunk."); + debug("Shorten::File::read() -- Channel count mismatch between Shorten and 'fmt ' chunk."); props.sampleRate = static_cast(chunkData.toUInt(offset, false)); offset += 4; @@ -441,7 +441,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) } if(!sawFormatChunk) { - debug("SHN::File::read() -- Missing 'fmt ' chunk."); + debug("Shorten::File::read() -- Missing 'fmt ' chunk."); setValid(false); return; } @@ -456,7 +456,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) chunkID = chunkData.toUInt(offset, true); offset += 4; if(chunkID != 0x41494646 /*'AIFF'*/ && chunkID != 0x41494643 /*'AIFC'*/) { - debug("SHN::File::read() -- Missing 'AIFF' or 'AIFC' in 'FORM' chunk."); + debug("Shorten::File::read() -- Missing 'AIFF' or 'AIFC' in 'FORM' chunk."); setValid(false); return; } @@ -479,7 +479,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) case 0x434f4d4d /*'COMM'*/: { if(chunkSize < 18) { - debug("SHN::File::read() -- 'COMM' chunk is too small."); + debug("Shorten::File::read() -- 'COMM' chunk is too small."); setValid(false); return; } @@ -487,7 +487,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) int commChannelCount = chunkData.toUShort(offset, true); offset += 2; if(props.channelCount != commChannelCount) - debug("SHN::File::read() -- Channel count mismatch between Shorten and 'COMM' chunk."); + debug("Shorten::File::read() -- Channel count mismatch between Shorten and 'COMM' chunk."); props.sampleFrames = static_cast(chunkData.toUInt(offset, true)); offset += 4; @@ -500,7 +500,7 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) auto exp = static_cast(chunkData.toUShort(offset, true)) - 16383 - 63; offset += 2; if(exp < -63 || exp > 63) { - debug("SHN::File::read() -- exp out of range."); + debug("Shorten::File::read() -- exp out of range."); setValid(false); return; } @@ -526,13 +526,13 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) } if(!sawCommonChunk) { - debug("SHN::File::read() -- Missing 'COMM' chunk"); + debug("Shorten::File::read() -- Missing 'COMM' chunk"); setValid(false); return; } } else { - debug("SHN::File::read() -- Unsupported data format."); + debug("Shorten::File::read() -- Unsupported data format."); setValid(false); return; } diff --git a/taglib/shn/shnfile.h b/taglib/shorten/shortenfile.h similarity index 96% rename from taglib/shn/shnfile.h rename to taglib/shorten/shortenfile.h index ee860106..96359808 100644 --- a/taglib/shn/shnfile.h +++ b/taglib/shorten/shortenfile.h @@ -23,16 +23,16 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#ifndef TAGLIB_SHNFILE_H -#define TAGLIB_SHNFILE_H +#ifndef TAGLIB_SHORTENFILE_H +#define TAGLIB_SHORTENFILE_H #include #include "taglib_export.h" #include "tfile.h" -#include "shnproperties.h" -#include "shntag.h" +#include "shortenproperties.h" +#include "shortentag.h" namespace TagLib { @@ -42,7 +42,7 @@ namespace TagLib { * This is an implementation of Shorten metadata. */ - namespace SHN { + namespace Shorten { //! An implementation of \c TagLib::File with Shorten specific methods @@ -134,7 +134,7 @@ namespace TagLib { TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; - } // namespace SHN + } // namespace Shorten } // namespace TagLib #endif diff --git a/taglib/shn/shnproperties.cpp b/taglib/shorten/shortenproperties.cpp similarity index 82% rename from taglib/shn/shnproperties.cpp rename to taglib/shorten/shortenproperties.cpp index 3e47793e..65aca412 100644 --- a/taglib/shn/shnproperties.cpp +++ b/taglib/shorten/shortenproperties.cpp @@ -24,13 +24,13 @@ ***************************************************************************/ -#include "shnproperties.h" +#include "shortenproperties.h" -#include "shnutils.h" +#include "shortenutils.h" using namespace TagLib; -class SHN::Properties::PropertiesPrivate +class Shorten::Properties::PropertiesPrivate { public: PropertiesPrivate() = default; @@ -51,7 +51,7 @@ public: int length { 0 }; }; -SHN::Properties::Properties(const PropertyValues *values, ReadStyle style) : +Shorten::Properties::Properties(const PropertyValues *values, ReadStyle style) : AudioProperties(style), d(std::make_unique()) { @@ -69,44 +69,44 @@ SHN::Properties::Properties(const PropertyValues *values, ReadStyle style) : } } -SHN::Properties::~Properties() = default; +Shorten::Properties::~Properties() = default; -int SHN::Properties::lengthInMilliseconds() const +int Shorten::Properties::lengthInMilliseconds() const { return d->length; } -int SHN::Properties::bitrate() const +int Shorten::Properties::bitrate() const { return d->bitrate; } -int SHN::Properties::sampleRate() const +int Shorten::Properties::sampleRate() const { return d->sampleRate; } -int SHN::Properties::channels() const +int Shorten::Properties::channels() const { return d->channelCount; } -int SHN::Properties::shortenVersion() const +int Shorten::Properties::shortenVersion() const { return d->version; } -int SHN::Properties::fileType() const +int Shorten::Properties::fileType() const { return d->fileType; } -int SHN::Properties::bitsPerSample() const +int Shorten::Properties::bitsPerSample() const { return d->bitsPerSample; } -unsigned long SHN::Properties::sampleFrames() const +unsigned long Shorten::Properties::sampleFrames() const { return d->sampleFrames; } diff --git a/taglib/shn/shnproperties.h b/taglib/shorten/shortenproperties.h similarity index 96% rename from taglib/shn/shnproperties.h rename to taglib/shorten/shortenproperties.h index f94638b1..b6a389c7 100644 --- a/taglib/shn/shnproperties.h +++ b/taglib/shorten/shortenproperties.h @@ -23,8 +23,8 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#ifndef TAGLIB_SHNPROPERTIES_H -#define TAGLIB_SHNPROPERTIES_H +#ifndef TAGLIB_SHORTENPROPERTIES_H +#define TAGLIB_SHORTENPROPERTIES_H #include @@ -32,7 +32,7 @@ #include "audioproperties.h" namespace TagLib { - namespace SHN { + namespace Shorten { struct PropertyValues; @@ -68,7 +68,7 @@ namespace TagLib { TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; - } // namespace SHN + } // namespace Shorten } // namespace TagLib #endif diff --git a/taglib/shn/shntag.cpp b/taglib/shorten/shortentag.cpp similarity index 72% rename from taglib/shn/shntag.cpp rename to taglib/shorten/shortentag.cpp index bac2efa6..a7224810 100644 --- a/taglib/shn/shntag.cpp +++ b/taglib/shorten/shortentag.cpp @@ -23,92 +23,92 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include "shntag.h" +#include "shortentag.h" #include "tpropertymap.h" using namespace TagLib; -class SHN::Tag::TagPrivate +class Shorten::Tag::TagPrivate { }; -SHN::Tag::Tag() : +Shorten::Tag::Tag() : d(std::make_unique()) { } -SHN::Tag::~Tag() = default; +Shorten::Tag::~Tag() = default; -String SHN::Tag::title() const +String Shorten::Tag::title() const { return String(); } -String SHN::Tag::artist() const +String Shorten::Tag::artist() const { return String(); } -String SHN::Tag::album() const +String Shorten::Tag::album() const { return String(); } -String SHN::Tag::comment() const +String Shorten::Tag::comment() const { return String(); } -String SHN::Tag::genre() const +String Shorten::Tag::genre() const { return String(); } -unsigned int SHN::Tag::year() const +unsigned int Shorten::Tag::year() const { return 0; } -unsigned int SHN::Tag::track() const +unsigned int Shorten::Tag::track() const { return 0; } -void SHN::Tag::setTitle(const String &) +void Shorten::Tag::setTitle(const String &) { } -void SHN::Tag::setArtist(const String &) +void Shorten::Tag::setArtist(const String &) { } -void SHN::Tag::setAlbum(const String &) +void Shorten::Tag::setAlbum(const String &) { } -void SHN::Tag::setComment(const String &) +void Shorten::Tag::setComment(const String &) { } -void SHN::Tag::setGenre(const String &) +void Shorten::Tag::setGenre(const String &) { } -void SHN::Tag::setYear(unsigned int) +void Shorten::Tag::setYear(unsigned int) { } -void SHN::Tag::setTrack(unsigned int) +void Shorten::Tag::setTrack(unsigned int) { } -PropertyMap SHN::Tag::properties() const +PropertyMap Shorten::Tag::properties() const { return PropertyMap{}; } -PropertyMap SHN::Tag::setProperties(const PropertyMap &origProps) +PropertyMap Shorten::Tag::setProperties(const PropertyMap &origProps) { return PropertyMap{origProps}; } diff --git a/taglib/shn/shntag.h b/taglib/shorten/shortentag.h similarity index 97% rename from taglib/shn/shntag.h rename to taglib/shorten/shortentag.h index 5048c0d0..b4f394a1 100644 --- a/taglib/shn/shntag.h +++ b/taglib/shorten/shortentag.h @@ -23,13 +23,13 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#ifndef TAGLIB_SHNTAG_H -#define TAGLIB_SHNTAG_H +#ifndef TAGLIB_SHORTENTAG_H +#define TAGLIB_SHORTENTAG_H #include "tag.h" namespace TagLib { - namespace SHN { + namespace Shorten { //! A Shorten file tag implementation @@ -133,7 +133,7 @@ namespace TagLib { std::unique_ptr d; }; - } // namespace SHN + } // namespace Shorten } // namespace TagLib #endif diff --git a/taglib/shn/shnutils.h b/taglib/shorten/shortenutils.h similarity index 92% rename from taglib/shn/shnutils.h rename to taglib/shorten/shortenutils.h index d5c57d5e..bc9c24bd 100644 --- a/taglib/shn/shnutils.h +++ b/taglib/shorten/shortenutils.h @@ -23,17 +23,17 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#ifndef TAGLIB_SHNUTILS_H -#define TAGLIB_SHNUTILS_H +#ifndef TAGLIB_SHORTENUTILS_H +#define TAGLIB_SHORTENUTILS_H // THIS FILE IS NOT A PART OF THE TAGLIB API #ifndef DO_NOT_DOCUMENT // tell Doxygen not to document this header namespace TagLib { - namespace SHN { + namespace Shorten { - /// Values shared with \c SHN::Properties by \c SHN::File + /// Values shared with \c Shorten::Properties by \c Shorten::File struct PropertyValues { int version { 0 }; @@ -43,7 +43,7 @@ namespace TagLib { int bitsPerSample { 0 }; unsigned long sampleFrames { 0 }; }; - } // namespace SHN + } // namespace Shorten } // namespace TagLib #endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c7557a09..b36f75d8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -27,7 +27,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/xm ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/dsf ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/dsdiff - ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/shn + ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/shorten ) SET(test_runner_SRCS @@ -75,7 +75,7 @@ SET(test_runner_SRCS test_speex.cpp test_dsf.cpp test_dsdiff.cpp - test_shn.cpp + test_shorten.cpp test_sizes.cpp test_versionnumber.cpp ) diff --git a/tests/test_shn.cpp b/tests/test_shorten.cpp similarity index 83% rename from tests/test_shn.cpp rename to tests/test_shorten.cpp index 0857213f..103b18be 100644 --- a/tests/test_shn.cpp +++ b/tests/test_shorten.cpp @@ -4,7 +4,7 @@ #include "tbytevectorlist.h" #include "tpropertymap.h" #include "tag.h" -#include "shnfile.h" +#include "shortenfile.h" #include "plainfile.h" #include #include "utils.h" @@ -12,9 +12,9 @@ using namespace std; using namespace TagLib; -class TestSHN : public CppUnit::TestFixture +class TestShorten : public CppUnit::TestFixture { - CPPUNIT_TEST_SUITE(TestSHN); + CPPUNIT_TEST_SUITE(TestShorten); CPPUNIT_TEST(testBasic); CPPUNIT_TEST(testTags); CPPUNIT_TEST_SUITE_END(); @@ -23,7 +23,7 @@ public: void testBasic() { - SHN::File f(TEST_FILE_PATH_C("2sec-silence.shn")); + Shorten::File f(TEST_FILE_PATH_C("2sec-silence.shn")); CPPUNIT_ASSERT(f.audioProperties()); CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(2000, f.audioProperties()->lengthInMilliseconds()); @@ -41,4 +41,4 @@ public: } }; -CPPUNIT_TEST_SUITE_REGISTRATION(TestSHN); +CPPUNIT_TEST_SUITE_REGISTRATION(TestShorten); diff --git a/tests/test_sizes.cpp b/tests/test_sizes.cpp index 603c9578..5c2b2e9a 100644 --- a/tests/test_sizes.cpp +++ b/tests/test_sizes.cpp @@ -92,9 +92,9 @@ #include "rifffile.h" #include "s3mfile.h" #include "s3mproperties.h" -#include "shnfile.h" -#include "shnproperties.h" -#include "shntag.h" +#include "shortenfile.h" +#include "shortenproperties.h" +#include "shortentag.h" #include "speexfile.h" #include "speexproperties.h" #include "synchronizedlyricsframe.h" @@ -248,9 +248,9 @@ public: CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::RIFF::WAV::Properties)); CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::S3M::File)); CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::S3M::Properties)); - CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::SHN::File)); - CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::SHN::Properties)); - CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::SHN::Tag)); + CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Shorten::File)); + CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Shorten::Properties)); + CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Shorten::Tag)); CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::String)); CPPUNIT_ASSERT_EQUAL(classSize(2, false), sizeof(TagLib::StringList)); CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::Tag));