Bug 1877849 - python-pyglet sound synthesis tests fail on big-endian architectures
Summary: python-pyglet sound synthesis tests fail on big-endian architectures
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pyglet
Version: 34
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker F-ExcludeArch-s390x 1887228
TreeView+ depends on / blocked
 
Reported: 2020-09-10 15:04 UTC by Petr Viktorin (pviktori)
Modified: 2021-10-29 23:04 UTC (History)
6 users (show)

Fixed In Version: python-pyglet-1.5.16-4.fc36 python-pyglet-1.5.16-4.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-12 16:40:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pyglet pyglet issues 278 0 None open Sound synthesis tests fail on big-endian architectures 2020-11-10 09:47:57 UTC

Description Petr Viktorin (pviktori) 2020-09-10 15:04:51 UTC
Tests for pyglet.media.synthesis, and possibly sound synthesis itself, fail on big-endian architectures.
See the upstream issue for details.

Comment 1 Petr Viktorin (pviktori) 2020-10-09 14:11:04 UTC
Pyglet can synthesize simple sounds, which are meant for immediate playback rather than saving to a file.
I do not know if the failure is a bad test or if bad data is passed to the sound system.

Is there a way I can listen to the sound generated and played on a big-endian machine?

Comment 2 Petr Viktorin (pviktori) 2020-11-13 12:40:29 UTC
I don't think this will ever have enough priority for me, but if anyone wants to take it, go ahead.

Comment 3 Ben Cotton 2021-02-09 16:25:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 4 Jerry James 2021-09-21 22:07:53 UTC
I was alerted to this bug because of bug 2006529; sympy depends on pyglet, so now sympy cannot be installed on s390x.  I would like to try to fix this bug.

I have shell access to an s390x machine, thanks to Dan Horák.  On that machine, I installed flac and then flac-converted the WAV files in tests/data/media.  The flac binary ran without error.  I then copied the flac files back to my little endian x86_64 machine, and played each original WAV file, followed immediately by the corresponding flac.  The sounds are identical in each case.  This suggests to me that the test files are correct, and that the synthesis code needs to generate bytes in little endian order, regardless of host architecture.

This theory is bolstered by claims that files that start with RIFF (as those generated by pyglet do) are little endian.  For example:

https://stackoverflow.com/questions/1111539/is-the-endianness-of-format-params-guaranteed-in-riff-wav-files
https://en.wikipedia.org/wiki/Resource_Interchange_File_Format

I cannot test this theory directly, as I also do not have direct access to s390x hardware, but this seems plausible.  Does anybody object to an attempt to change the synthesis code, on the assumption that the test files are correct?

Comment 5 Jerry James 2021-09-21 23:30:40 UTC
See https://github.com/pyglet/pyglet/pull/469 for a possible fix.  The tests all pass with that commit.

Comment 6 Fedora Update System 2021-10-12 16:38:47 UTC
FEDORA-2021-82279f584d has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2021-82279f584d

Comment 7 Fedora Update System 2021-10-12 16:40:17 UTC
FEDORA-2021-82279f584d has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2021-10-12 17:02:04 UTC
FEDORA-2021-8e0dc324b8 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-8e0dc324b8

Comment 9 Fedora Update System 2021-10-13 18:52:13 UTC
FEDORA-2021-8e0dc324b8 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-8e0dc324b8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-8e0dc324b8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2021-10-29 23:04:22 UTC
FEDORA-2021-8e0dc324b8 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.