Allow parsing MP3 file-like objects without a .name parameter. #191
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.
Due to an underlying bug in JUCE's MP3 parser, Pedalboard was previously mis-identifying MP4 streams (and perhaps other formats too) as MP3 files, as long as a valid-looking MP3 header appeared in the first 32kB of the file. Pedalboard would detect this condition and throw an error like:
...forcing the user to specify a format hint on the file-like object by setting its
.name
parameter to something that ends with.mp3
.This PR fixes the issue by patching the MP3 parser, which we can now do as we've vendored our own copy as part of #183. After merging and deploying, Pedalboard will no longer require file-like objects containing MP3 data to have
.name
parameters to parse correctly on Linux or Windows.