-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for bytearray in chromaprint #31
Conversation
Thanks for looking into this! You're right that something else might be going on… this could be the right fix, but let's do some due diligence if you don't mind. Can you include some system details? Specifically:
In particular, I'm trying to get at the Audioread backend that's getting triggered for you, which should tell us what code is producing |
I was trying to fingerprint MP3 files. I have libgstreamer1.0-0 On Sun, Jul 31, 2016 at 7:55 PM, Adrian Sampson notifications@github.com
|
OK, sorry for the wild goose chase, but what about the package that Ubuntu calls |
I've seen bytearrays when pymad reads MP3s. |
That's very useful to know; thank you! |
To answer your earlier question, I have python-gi 3.20.0-0ubuntu1 installed. On Wed, Aug 24, 2016 at 1:01 PM, Adrian Sampson notifications@github.com
|
I was finally able to nail down this problem: indeed, pymad has started returning So we now accept that type as input. |
The pymad module didn't document this change, but it started returning bytearray objects as of version 0.9: jaqx0r/pymad@0231d16#comments So we now might produce that type. See also beetbox/pyacoustid#31 and beets/issues#2216.
As noted in my comments on beetbox/beets#1958, Beets seems to want to send bytearrays into Chromaprint, which currently wants only bytes. I have no idea how to fix it on Beets's end, so here's a PR that does the conversion.
When I just pass bytearrays on through, some other type-checking code complains about it being the wrong type, so I opted for the (possibly inefficient) conversion instead.