Skip to content
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

track/serato/markers: Fix parsing of position values #2671

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

Holzhaus
Copy link
Member

@Holzhaus Holzhaus commented Apr 17, 2020

The cue position values in the Serato Markers_ tag use the same strange
4-byte encoding of 24 bit values that track colors use.

Prerequesite for #2526.

The cue position values in the `Serato Markers_` tag use the same strange
4-byte encoding of 24 bit values that track colors use.
@Holzhaus Holzhaus added this to the 2.3.0 milestone Apr 17, 2020
@uklotzde
Copy link
Contributor

They did this on purpose. Bastards ;)

@Holzhaus
Copy link
Member Author

Yeah, I wonder if it's to prevent reverse engineering or if it's for some kind of "poor man's integrity check".

@Holzhaus
Copy link
Member Author

Most of the changes are renaming variables/function, modifying comments and fixing the tests. The actual changes to the position parsing are small: https://github.com/mixxxdj/mixxx/pull/2671/files#diff-ac00585ee405309584d3c94b489ffe17R122-R150

@Be-ing
Copy link
Contributor

Be-ing commented Apr 17, 2020

I wouldn't assume it's on purpose. It could be accidental, but it happens to work with whatever code they're using.

@Be-ing
Copy link
Contributor

Be-ing commented Apr 17, 2020

CI succeeded 👍

@Be-ing Be-ing merged commit 6e8fcb2 into mixxxdj:master Apr 17, 2020
@Be-ing
Copy link
Contributor

Be-ing commented Apr 17, 2020

Maybe the tests in Uwe's branch will work now with this fix?

@uklotzde
Copy link
Contributor

I'll retry to parse and dump the tag obtained from a FLAC file.

@Holzhaus
Copy link
Member Author

AFAIK the FLAC files only have Serato Markers V2, not the first version, so it should be unaffected.
https://github.com/Holzhaus/serato-tags/blob/master/docs/fileformats.md#flac

@uklotzde
Copy link
Contributor

Still differences. The first bytes match, then some differences occur.

Applying the base64 encoding twice on some parts of their marker data is a strange decision by Serato.

Original:

YXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtAABTZXJhdG8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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

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

Successfully merging this pull request may close these issues.

3 participants