Skip to content

Add DSD format support (DSF and DFF)#598

Closed
M0Rf30 wants to merge 8 commits intoSerial-ATA:mainfrom
M0Rf30:feat/dsd-support
Closed

Add DSD format support (DSF and DFF)#598
M0Rf30 wants to merge 8 commits intoSerial-ATA:mainfrom
M0Rf30:feat/dsd-support

Conversation

@M0Rf30
Copy link
Contributor

@M0Rf30 M0Rf30 commented Jan 30, 2026

Adds read/write support for DSF and DFF audio formats.

DSF (DSD Stream File):

  • Parse header, format chunks, and audio properties
  • Read/write ID3v2 tags at file end

DFF (DSDIFF):

  • Parse FRM8 container with PROP and audio chunks
  • Read/write ID3v2 tags in ID3 chunks
  • Read/write DIIN text chunks (artist, title)
  • Read/write COMT comment chunks

Supports DSD64 through DSD512 sample rates (2.8MHz - 22.5MHz).
Includes fuzz targets and test files.

Copy link
Owner

@Serial-ATA Serial-ATA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! I haven't done a full review yet, but here's what I've gathered so far.

@M0Rf30 M0Rf30 changed the title Adds read/write support for DSD audio formats with ID3v2 tagging. Add DSD format support (DSF and DFF) Jan 31, 2026
@M0Rf30 M0Rf30 requested a review from Serial-ATA January 31, 2026 14:46
Copy link
Owner

@Serial-ATA Serial-ATA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the comments so quickly! When I get a chance, I'll try this out with some real world assets. For now, mostly cleanup comments.

@M0Rf30 M0Rf30 force-pushed the feat/dsd-support branch 3 times, most recently from 694fafa to 7a78737 Compare January 31, 2026 19:01
@M0Rf30 M0Rf30 requested a review from Serial-ATA January 31, 2026 19:02
@M0Rf30 M0Rf30 force-pushed the feat/dsd-support branch 2 times, most recently from 19261f9 to 97201ff Compare January 31, 2026 19:22
@M0Rf30 M0Rf30 force-pushed the feat/dsd-support branch 6 times, most recently from 120fa5a to 3d0af5c Compare January 31, 2026 21:41
@M0Rf30 M0Rf30 requested a review from Serial-ATA February 1, 2026 01:49
@M0Rf30
Copy link
Contributor Author

M0Rf30 commented Feb 3, 2026

I think now everything should be ok

@M0Rf30
Copy link
Contributor Author

M0Rf30 commented Feb 9, 2026

Any news on this? Don't want to put stress in any way 😄 . Is it fine or should I change something?

Replace manual write_fn with internal_write_module annotation for
both DFF and DSF formats. This auto-generates the write module and
eliminates code duplication.

- Rename write.rs to write_impl.rs to avoid module name conflicts
- Remove redundant write_to and write_dff_file/write_dsf_file functions
- Update all references to use write_impl module
- Clean up unused imports
@Serial-ATA
Copy link
Owner

@M0Rf30 I've updated the contributing guidelines to mention AI usage: https://github.com/Serial-ATA/lofty-rs/blob/main/CONTRIBUTING.md#note-on-ai

This is a feature I'd really like to see, but I cannot go back and forth with an LLM in my reviews. Feel free to open another PR if you clean up the implementation in the future.

@Serial-ATA Serial-ATA closed this Feb 15, 2026
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.

2 participants