Repository navigation
fix: Handle 32bit FLAC files - #9121
Merged
Merged
Conversation
Ressurects audacity#6638, to solve audacity#6606. We handle this by promoting 24/32bit FLAC files to floating point tracks. I believe this fixes audacity#6606 for me, though I am still testing on more sample data, and comparing to external conversion with ffmpeg to check.
Member
|
Ohey, so my thinking wasn't entirely wrong! |
kryksyh
reviewed
Jul 23, 2025
| channel.AppendBuffer((samplePtr)buffer[chn], | ||
| int24Sample, | ||
| auto tmp = ArrayOf<float>{ frame->header.blocksize }; | ||
| // handles both 24/32bit PCM. Divide by 2^n-1 to form -1-1 scaled floats |
Member
There was a problem hiding this comment.
@kdm9 is there a specific reason you chose to convert 24bit to float?
Contributor
Author
There was a problem hiding this comment.
I guess not, I've reverted this in the latest commit.
kryksyh
approved these changes
Jul 23, 2025
kdm9
added a commit
to gekkonid/audacity
that referenced
this pull request
Jul 27, 2025
This commit is audacity#9121 ported to the upcoming AU4 main branch.
5 of 6 tasks
kryksyh
pushed a commit
that referenced
this pull request
Jul 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for all your work such a fantastic tool!
This PR resurrects & extends #6638, to solve #6606, namely the inappropriate conversion of 32bit PCM FLAC files to floating point tracks.
We handle this by promoting 24/32bit FLAC files to floating point tracks, doing the int->float during import of each frame.
This fixes #6606 for me, though I am still testing on more sample data, and comparing to external conversion with ffmpeg to check.
This should port pretty nicely to AU4, so once you are happy with this I can make a separate PR for AU4/main branch.
Resolves: #6606
Recommended: