Skip to content

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

Merged
Be-ing merged 1 commit intomixxxdj:masterfrom
Holzhaus:serato-markers-position-fix
Apr 17, 2020
Merged

track/serato/markers: Fix parsing of position values#2671
Be-ing merged 1 commit intomixxxdj:masterfrom
Holzhaus:serato-markers-position-fix

Conversation

@Holzhaus
Copy link
Copy Markdown
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
Copy Markdown
Contributor

They did this on purpose. Bastards ;)

@Holzhaus
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Be-ing commented Apr 17, 2020

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

@uklotzde
Copy link
Copy Markdown
Contributor

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

@Holzhaus
Copy link
Copy Markdown
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
Copy Markdown
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:

YXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtAABTZXJhdG8gTWFya2VyczIAAQFBUUZEVDB4UFVn
QUFBQUFFQVAvLy8wSlFUVXhQUTBzQUFBQUFBUUFBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAA

Parsed and dumped:

YXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtAABTZXJhdG8gTWFya2VyczIAAUFRRkRUMHhQVWdB
QUFBQUVBUC8vLzBKUVRVeFBRMHNBQUFBQUFRQUEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
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