Skip to content

Make DSD (DSF format) conditional on taglib support - #205

Open
tmzullinger wants to merge 1 commit into
complexlogic:masterfrom
tmzullinger:taglib-dsf-conditional
Open

tmzullinger wants to merge 1 commit into
complexlogic:masterfrom
tmzullinger:taglib-dsf-conditional

Conversation

@tmzullinger

Copy link
Copy Markdown

The functions required by 832df65 (Add DSD (DSF format) support (#178), 2026-03-22) are present only in taglib >= 2.0, with TagLib::DSF::File added in taglib commit 39d1d682 (DSD Stream File (DSF) support, 2023-09-25).

Rather than increase the minimum taglib support, make DSD/DSF support conditional as is done for Matroska support.

A downside of using the TAGLIB_WITH_DSF define is that it was added in taglib-2.1, commit ee1931b8 (Compile time configuration of supported formats (#1262), 2025-02-02), while TagLib::DSF::File was added in taglib-2.0 (in the commit noted above).

To avoid this, also check for TAGLIB_MAJOR_VERSION > 1.

The functions required by 832df65 (Add DSD (DSF format) support (complexlogic#178),
2026-03-22) are present only in taglib >= 2.0, with `TagLib::DSF::File`
added in taglib commit 39d1d682 (DSD Stream File (DSF) support,
2023-09-25).

Rather than increase the minimum taglib support, make DSD/DSF support
conditional as is done for Matroska support.

A downside of using the `TAGLIB_WITH_DSF` define is that it was added in
taglib-2.1, commit ee1931b8 (Compile time configuration of supported
formats (#1262), 2025-02-02), while `TagLib::DSF::File` was added in
taglib-2.0 (in the commit noted above).

To avoid this, also check for `TAGLIB_MAJOR_VERSION > 1`.
@tmzullinger

Copy link
Copy Markdown
Author

I ran into this while building 3.8 for a host which had taglib-1.12, which should be new enough but failed because of the unconditional use of TagLib::DSF::File.

This could use only TAGLIB_MAJOR_VERSION > 1 to define HAS_DSF but it seemed cleaner to look at the upstream TAGLIB_WITH_DSF when available and note in the comment when the additional TAGLIB_MAJOR_VERSION check can be removed.

I tested on Fedora 44 (taglib-2.3) and Rocky 9 (taglib-1.12). I also tested the patch with only defined(TAGLIB_WITH_DSF) && TAGLIB_WITH_DSF == 1, only TAGLIB_MAJOR_VERSION > 1, and with both, as I didn't have a handy system which had taglib-2.0 to test against. (Fedora jumped from 1.13 in F43 to 2.1.1 in F44 and has since updated it to 2.3.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant