GH-60729: Add IEEE format wave audio support take two#145931
GH-60729: Add IEEE format wave audio support take two#145931mbeijen 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).
|
🤖 New build scheduled with the buildbot fleet by @encukou for commit 6247ace 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F145931%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
encukou
left a comment
There was a problem hiding this comment.
Thank you!
I'll run the buildbot tests this time. (Don't worry if some fail; there are some flaky ones in this set.)
I was surprised there were no big endian tests on PRs only on main!! I'm sorry for the churn this caused.
I should be apologizing here, for not catching this!
Yeah, we don't get that many issues around endianness; the s390x tests run after merge.
Normally I'd have looked into the issue and sent a fix, but I only noticed the failures as I was leaving for the weekend and wanted the tests to be green the next few days. Sorry you got caught in the churn!
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/