Fixed build with TagLib 1.x

This commit is contained in:
emeric
2025-11-15 22:25:08 +01:00
parent 7a94ca3fe6
commit d581d2a90b
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -161,9 +161,11 @@ namespace lms::audio::taglib
audioProperties.container = ContainerType::MPEG;
if ((properties.version() == TagLib::MPEG::Header::Version::Version1 || properties.version() == TagLib::MPEG::Header::Version::Version2 || properties.version() == TagLib::MPEG::Header::Version::Version2_5)
&& mpegFile->audioProperties()->layer() == 3)
audioProperties.codec = CodecType::MP3; // could be MPEG-1 layer 3 or MPEG-2(.5) layer 3
audioProperties.codec = CodecType::MP3; // could be MPEG-1 layer 3 or MPEG-2(.5) layer 3
#if LMS_TAGLIB_HAS_ADTS
else if (mpegFile->audioProperties()->isADTS()) // likely AAC
audioProperties.codec = CodecType::AAC;
#endif
}
else if (dynamic_cast<const ::TagLib::Ogg::Opus::File*>(&file))
{
@@ -23,6 +23,7 @@
#if (TAGLIB_MAJOR_VERSION >= 2)
#define LMS_TAGLIB_HAS_DSF 1
#define LMS_TAGLIB_HAS_ADTS 1
#endif
// LMS_TAGLIB_HAS_MP4_ITEM_TYPE if version >= 2.0.1