Updated clang format, and restored dsd file handling that was actually broken
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ Language: Cpp
|
|||||||
BasedOnStyle: Microsoft
|
BasedOnStyle: Microsoft
|
||||||
Standard: c++20
|
Standard: c++20
|
||||||
AccessModifierOffset: -4
|
AccessModifierOffset: -4
|
||||||
AlignAfterOpenBracket: DontAlign
|
AlignAfterOpenBracket: Align
|
||||||
AlignConsecutiveAssignments: false
|
AlignConsecutiveAssignments: false
|
||||||
AlignConsecutiveDeclarations: false
|
AlignConsecutiveDeclarations: false
|
||||||
AlignOperands: AlignAfterOperator
|
AlignOperands: AlignAfterOperator
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <taglib/taglib.h>
|
#include <taglib/taglib.h>
|
||||||
|
|
||||||
#if (TAGLIB_MAJOR_VERSION > 2)
|
#if (TAGLIB_MAJOR_VERSION >= 2)
|
||||||
#define TAGLIB_HAS_DSF 1
|
#define TAGLIB_HAS_DSF 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
#include <taglib/wavfile.h>
|
#include <taglib/wavfile.h>
|
||||||
#include <taglib/wavpackfile.h>
|
#include <taglib/wavpackfile.h>
|
||||||
#if TAGLIB_HAS_DSF
|
#if TAGLIB_HAS_DSF
|
||||||
|
#include <taglib/dsdifffile.h>
|
||||||
#include <taglib/dsffile.h>
|
#include <taglib/dsffile.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -452,6 +453,8 @@ namespace lms::metadata::taglib
|
|||||||
#if TAGLIB_HAS_DSF
|
#if TAGLIB_HAS_DSF
|
||||||
else if (const auto* dsfProperties{ dynamic_cast<const TagLib::DSF::Properties*>(properties) })
|
else if (const auto* dsfProperties{ dynamic_cast<const TagLib::DSF::Properties*>(properties) })
|
||||||
_audioProperties.bitsPerSample = dsfProperties->bitsPerSample();
|
_audioProperties.bitsPerSample = dsfProperties->bitsPerSample();
|
||||||
|
else if (const auto* dsfProperties{ dynamic_cast<const TagLib::DSDIFF::Properties*>(properties) })
|
||||||
|
_audioProperties.bitsPerSample = dsfProperties->bitsPerSample();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
#include <taglib/wavfile.h>
|
#include <taglib/wavfile.h>
|
||||||
#include <taglib/wavpackfile.h>
|
#include <taglib/wavpackfile.h>
|
||||||
#if TAGLIB_HAS_DSF
|
#if TAGLIB_HAS_DSF
|
||||||
|
#include <taglib/dsdifffile.h>
|
||||||
#include <taglib/dsffile.h>
|
#include <taglib/dsffile.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -50,8 +51,7 @@ namespace lms::metadata::taglib::utils
|
|||||||
{
|
{
|
||||||
std::span<const std::filesystem::path> getSupportedExtensions()
|
std::span<const std::filesystem::path> getSupportedExtensions()
|
||||||
{
|
{
|
||||||
static const std::vector<std::filesystem::path> supportedExtensions
|
static const std::vector<std::filesystem::path> supportedExtensions{
|
||||||
{
|
|
||||||
".mp3", ".mp2", ".aac", ".ogg", ".oga", ".flac", ".spx", ".opus",
|
".mp3", ".mp2", ".aac", ".ogg", ".oga", ".flac", ".spx", ".opus",
|
||||||
".mpc", ".wv", ".ape", ".tta", ".m4a", ".m4r", ".m4b", ".m4p",
|
".mpc", ".wv", ".ape", ".tta", ".m4a", ".m4r", ".m4b", ".m4p",
|
||||||
".3g2", ".m4v", ".wma", ".asf", ".aif", ".aiff", ".afc", ".aifc",
|
".3g2", ".m4v", ".wma", ".asf", ".aif", ".aiff", ".afc", ".aifc",
|
||||||
@@ -201,9 +201,9 @@ namespace lms::metadata::taglib::utils
|
|||||||
else if (TagLib::RIFF::WAV::File::isSupported(stream))
|
else if (TagLib::RIFF::WAV::File::isSupported(stream))
|
||||||
file = std::make_unique<TagLib::RIFF::WAV::File>(stream, readAudioProperties, audioPropertiesStyle);
|
file = std::make_unique<TagLib::RIFF::WAV::File>(stream, readAudioProperties, audioPropertiesStyle);
|
||||||
#if TAGLIB_HAS_DSF
|
#if TAGLIB_HAS_DSF
|
||||||
else if (DSF::File::isSupported(stream))
|
else if (TagLib::DSF::File::isSupported(stream))
|
||||||
file = std::make_unique<TagLib::DSF::File>(stream, readAudioProperties, audioPropertiesStyle);
|
file = std::make_unique<TagLib::DSF::File>(stream, readAudioProperties, audioPropertiesStyle);
|
||||||
else if (DSDIFF::File::isSupported(stream))
|
else if (TagLib::DSDIFF::File::isSupported(stream))
|
||||||
file = std::make_unique<TagLib::DSDIFF::File>(stream, readAudioProperties, audioPropertiesStyle);
|
file = std::make_unique<TagLib::DSDIFF::File>(stream, readAudioProperties, audioPropertiesStyle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user