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
|
||||
Standard: c++20
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignOperands: AlignAfterOperator
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <taglib/taglib.h>
|
||||
|
||||
#if (TAGLIB_MAJOR_VERSION > 2)
|
||||
#if (TAGLIB_MAJOR_VERSION >= 2)
|
||||
#define TAGLIB_HAS_DSF 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <taglib/wavfile.h>
|
||||
#include <taglib/wavpackfile.h>
|
||||
#if TAGLIB_HAS_DSF
|
||||
#include <taglib/dsdifffile.h>
|
||||
#include <taglib/dsffile.h>
|
||||
#endif
|
||||
|
||||
@@ -452,6 +453,8 @@ namespace lms::metadata::taglib
|
||||
#if TAGLIB_HAS_DSF
|
||||
else if (const auto* dsfProperties{ dynamic_cast<const TagLib::DSF::Properties*>(properties) })
|
||||
_audioProperties.bitsPerSample = dsfProperties->bitsPerSample();
|
||||
else if (const auto* dsfProperties{ dynamic_cast<const TagLib::DSDIFF::Properties*>(properties) })
|
||||
_audioProperties.bitsPerSample = dsfProperties->bitsPerSample();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <taglib/wavfile.h>
|
||||
#include <taglib/wavpackfile.h>
|
||||
#if TAGLIB_HAS_DSF
|
||||
#include <taglib/dsdifffile.h>
|
||||
#include <taglib/dsffile.h>
|
||||
#endif
|
||||
|
||||
@@ -50,8 +51,7 @@ namespace lms::metadata::taglib::utils
|
||||
{
|
||||
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",
|
||||
".mpc", ".wv", ".ape", ".tta", ".m4a", ".m4r", ".m4b", ".m4p",
|
||||
".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))
|
||||
file = std::make_unique<TagLib::RIFF::WAV::File>(stream, readAudioProperties, audioPropertiesStyle);
|
||||
#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);
|
||||
else if (DSDIFF::File::isSupported(stream))
|
||||
else if (TagLib::DSDIFF::File::isSupported(stream))
|
||||
file = std::make_unique<TagLib::DSDIFF::File>(stream, readAudioProperties, audioPropertiesStyle);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user