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

When loading a track to an autosync'ed deck, the BPM factor is defaulted to 1 #13689

Open
acolombier opened this issue Sep 23, 2024 · 1 comment

Comments

@acolombier
Copy link
Member

Bug Description

Usually, Mixxx detect the best factor (1/2, 1 or 2) to apply when sync-ing a decks together. This way, when you can sync a 100 BPM track with a 200 one without changing the rate.
This behaviour however doesn't work when the deck is already sync'ed to a leader, and a track get's loaded

Current behaviour

  • Load a 174 BPM track on deck A
  • Make deck A sync leader
  • Make deck B auto-sync'ed
  • Load a 87 BPM track on deck B
    -> Deck B's BPM is 174 BPM. rate is 200%

Expected behaviour

  • Load a 174 BPM track on deck A
  • Make deck A sync leader
  • Make deck B auto-sync'ed
  • Load a 87 BPM track on deck B
    -> Deck B's BPM is 87 BPM. rate is 100%

Note that it exist a unit test case that reproduce this exact issue

Version

2.6-alpha

OS

Pop OS 22.04 (with Wayland)

@acolombier
Copy link
Member Author

The root cause appears to be a race condition between the main thread, that recalculate the sync factor upon track load, and uses the BPM information which aren't yet updated. It will usually work one the second deck load, as the BPM information of the previously loaded track (in this example, the same) remains visible

BPM information gets updated by a CacheReader worker thread, once the file has started to be read

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

No branches or pull requests

1 participant