Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLAC encoder adds spurious WAVEFORMATEXTENSIBLE_CHANNEL_MASK comment to non-WFE files #376

Closed
gdtrfb55 opened this issue Jun 21, 2022 · 8 comments · Fixed by #377
Closed

Comments

@gdtrfb55
Copy link

gdtrfb55 commented Jun 21, 2022

I encountered this issue while encoding a set of WAVE files with mixed bit depths. In my case, it was a group of fifteen alphabetically-sorted WAVE files, all of which were 2-16-44100, except for a single 2-24-48000 file in the sixth position. I encoded the files using a simple flac *.wav command. Much to my surprise, every 2-16-44100 file processed after the 2-24-48000 file had a spurious channel mask comment in it. Curiously, despite the channel mask comments, when the files containing the spurious comments were extracted back to WAVE, the format codes for the extracted WAVE files were 0x0001, not 0xfffe. So, the issue, whatever it is, seems to be related only to the insertion of the channel mask comment.

As a test, I renamed the 2-24-48000 file so that it would be processed first by flac *.wav. As expected, this caused a channel mask comment to be generated for every subsequent file.

This did not occur when I encoded each file separately, i.e., flac 01.wav, flac 02.wav, etc.

My guess is that some flag relating to the insertion of the channel mask comment isn't getting cleared between loops of the code that processes command-line arguments.

If you need additional information, just ask.

Thanks!

@ktmf01
Copy link
Collaborator

ktmf01 commented Jun 23, 2022

With which version of FLAC did you try this?

@gdtrfb55
Copy link
Author

gdtrfb55 commented Jun 23, 2022 via email

@gdtrfb55
Copy link
Author

gdtrfb55 commented Jun 23, 2022 via email

@ktmf01
Copy link
Collaborator

ktmf01 commented Jun 23, 2022

Are you sure about that? I just tried to bisect this and it seems this issue was already present in FLAC 1.2.1 (i.e. for 15 years already) Also, according to the changelog, mask comments were already written by FLAC 1.1.3

@ktmf01
Copy link
Collaborator

ktmf01 commented Jun 23, 2022

@gdtrfb55 If you are familiar with building FLAC from source, maybe you want to give the solution in #377 a try? Otherwise, I will consider it fixed with that PR, I was able to reproduce the problem and at my end #377 fixes it.

@gdtrfb55
Copy link
Author

gdtrfb55 commented Jun 23, 2022 via email

@gdtrfb55
Copy link
Author

gdtrfb55 commented Oct 11, 2022 via email

@ktmf01
Copy link
Collaborator

ktmf01 commented Oct 11, 2022

You said yourself that it did, I haven't checked. Why do you ask?

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 a pull request may close this issue.

2 participants