Zeugma440 / atldotnet

Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
MIT License
459 stars 61 forks source link

WAV - Padding removed after adding tags #213

Closed mathiascode closed 1 year ago

mathiascode commented 1 year ago

The problem

I have a WAV file without ID3 tags, where a padding byte is added after the audio data due an odd-sized chunk length. ATL incorrectly removes the padding when adding tags.

Environment

Details

Original file (untitled.wav):

File with tags, created by TagLib (untitled_tag_taglib.wav):

File with tags, created by ATL (untitled_tag_atl.wav):

files.zip

mathiascode commented 1 year ago

I'm not sure if AIFF suffers from the same issue, but it might be worth verifying.

Zeugma440 commented 1 year ago

Thanks for your feedback and for providing sample files 😄

I have a WAV file without ID3 tags, where a padding byte is added after the audio data due an odd-sized chunk length. ATL incorrectly removes the padding when adding tags.

Correct. ATL creates the ID3 chunk at the wrong position, overwriting the last byte of the audio chunk. That's been fixed for next release.

I'm not sure if AIFF suffers from the same issue, but it might be worth verifying.

I just checked - AIFF doesn't need fixing 👌

mathiascode commented 1 year ago

Thanks for the quick fix! I wish these padded chunks weren't a thing, but it's too late for that. :)

Zeugma440 commented 1 year ago

Fix is available in today's v5.01