Skip to content

Fix endianness bug when generating fingerprint in big endian machines#88

Closed
pranavkaruvally wants to merge 1 commit intobeetbox:masterfrom
pranavkaruvally:s390x-fix
Closed

Fix endianness bug when generating fingerprint in big endian machines#88
pranavkaruvally wants to merge 1 commit intobeetbox:masterfrom
pranavkaruvally:s390x-fix

Conversation

@pranavkaruvally
Copy link
Copy Markdown

Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1093700

The script

import acoustid

example_file = '/usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga'
print(acoustid.fingerprint_file(example_file)[1].decode())

generates wrong fingerprint in big endian machines.

This PR fixes this issue.

@semohr
Copy link
Copy Markdown
Contributor

semohr commented Apr 9, 2026

I'm pretty sure byteswaps are handled in audioread correctly.

https://github.com/beetbox/audioread/blob/d5d8e25dbe3209436f44f2b5ad56d5b93aff7c31/audioread/rawread.py#L136-L138

@semohr
Copy link
Copy Markdown
Contributor

semohr commented Apr 10, 2026

Please reopen if this really is still an issue and I will have a more in-depth look.

@semohr semohr closed this Apr 10, 2026
@sandrotosi
Copy link
Copy Markdown

I'm pretty sure byteswaps are handled in audioread correctly.

https://github.com/beetbox/audioread/blob/d5d8e25dbe3209436f44f2b5ad56d5b93aff7c31/audioread/rawread.py#L136-L138

it's worth mentioning that this code does not appear to have made it into an audioread release yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants