Hey Michirin, I have an idea as to how you could make sure music is synced, with just one line of code (Per track you play).
If you're interested, here it is:
The only issue is you need to make sure every song is exactly the same length. I hope this helps,
(Also I would have emailed this to you, but I couldn't find any contact information on your profile)