GH-60729: Add IEEE format wave audio support take two#145931
Open
mbeijen wants to merge 13 commits intopython:mainfrom
Open
GH-60729: Add IEEE format wave audio support take two#145931mbeijen wants to merge 13 commits intopython:mainfrom
mbeijen wants to merge 13 commits intopython:mainfrom
Conversation
This adds support for floating point wav files and fix python#60729.
'format' is the term used in the wave audio specification
Per the RIFF/WAVE Rev. 3 documentation, non-PCM formats require a fact chunk, while PCM does not. This is also what libsdnfile/audacity do Reference: https://mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html (see the 'fact Chunk' section and linked Rev. 3 RIFF docs).
These methods are public but were previously not documented. This caused the unit tests to fail when I mentioned changes to getparams() in the whats new ;-)
…CHTe.rst Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This is also similar to what libsndfile does
Store the WaveIeeeFloatingPointTest frames data in big-endian byte order with a conditional byteswap for little-endian systems, matching the pattern used by all other PCM test classes. This fixes test_read and test_read_not_from_start failures on big-endian platforms (e.g. s390x).
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.
This is an updated version of #102574, the original PR where @lkoenig added support for IEEE Wave Audio.
As requested by @encukou
I've
formatto getparamsCloses: #102574
This is the new version of #145384 which got merged today AND reverted, because it failed on big-endian. Looking back I changed the test so it has the same structure as all other tests in test_wave.py and I ran it on an s390 docker image and tests are passing now for me. I was surprised there were no big endian tests on PRs only on main!! I'm sorry for the churn this caused.
📚 Documentation preview 📚: https://cpython-previews--145931.org.readthedocs.build/