-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
SyncLock: Don't recalc half/double multiplier on every callback #3706
Conversation
8e46045
to
ab1ae45
Compare
This patch is ready for review except that it builds on #3698 and there's no way to tell github to show the diff to that patch instead of main |
bc87485
to
92175c1
Compare
rebased / updated etc! ready for review |
Did you forget to push? I assume you want to make a single commit on top of main. |
Which code line contains the fix? Maybe it is also to have a single commit containing the fix only. |
027f60a
to
4844230
Compare
pSyncable->setMasterParams(beatDistance, mbaseBpm, mbpm); | ||
// update from current master | ||
pSyncable->updateMasterBeatDistance(beatDistance); | ||
pSyncable->updateMasterBpm(mbpm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the fix -- we just update the beat distance and bpm, NOT basebpm. Updating basebpm triggers all of the half/double code, and we should not do that on every callback.
rebased and squashed. Sorry to mix the refactor with the fix. |
Is this still [WIP] according to the title? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a remaining issue: When I sync to a non const tempo track at master in a slow start region with 100 BPM a cont track is synced to it it follows the track lets say to 150 BPM.
When I change now the explicite master to the const track, the original master haves the tempo.
That was at least surprising. I think we should also in this case not recalc the multiplier.
I am finding major half/double issues in the code in general :(. I will try to fix those first. |
This now is a followon to #3899 |
be3d82c
to
dd0c6da
Compare
I'll split out the fix |
6640a28
to
2d2b485
Compare
ok should be good now |
This has a failing test now. |
I can confirm that the original issue is fixed, now random pitch change when a track is playing. I have only discovered this weird case: When I have a playing track in deck A and it has a tempo change in this case form 107 to 100 and the follower is cued to take over at 160 it sits at 107 than suddenly changes to 200. I think we mus t accept this case to make the feature work at a whole. Of cause this does not happen when the internal clock takes over. |
2d2b485
to
47cd79e
Compare
fixed broken test (force push) |
Don't rebase PRs under review. I can now review and test the whole PR again, because I cannot see what has changed and fixed the test. Do you have the original commits you .git folder? |
Fortunately I had the original testing branch in my .git folder.
Next time it would be much less hassle if you just commit that fix. Easy to review and now business logic touched. |
This PR builds on #3698. It contains some refactoring to make the functions clearer.