Skip to content

Changed audio engine to switch to linear scaler upon entering scratching mode#15845

Merged
daschuer merged 2 commits intomixxxdj:2.5from
BoredGuy1:audio-engine-fix
Jan 30, 2026
Merged

Changed audio engine to switch to linear scaler upon entering scratching mode#15845
daschuer merged 2 commits intomixxxdj:2.5from
BoredGuy1:audio-engine-fix

Conversation

@BoredGuy1
Copy link
Contributor

@BoredGuy1 BoredGuy1 commented Jan 10, 2026

There is an issue when using the new Traktor S2MK3 mapping I made, which directly sets the speed using scratch2. When I scratch back and forth, the track continues to play in the old direction for a moment before correcting itself. This issue might come up in other mappings that directly set scratch2 as well.

I've attached a video (same as the one in Zulip chat) that hopefully illustrates the point better. In this video, I am moving the IRL jogwheel in a different direction every time I stop, but the virtual jogwheel is "snapping" every time I do that (because it keeps trying to go in the old direction).

bug.mp4

(To reproduce the issue: use my mapping w/ the Traktor S2MK3. Tap the top of the jogwheel without moving the jogwheel to enter scratching mode. Then scratch back and forth and you should see the lag)

I suspect this is due to an improper handoff between the SoundTouch/Rubberband algorithms and the linear scaling algorithm when entering/exiting scratching mode. This PR fixes the issue by making the engine switch to the linear scaler when scratching begins, even if the platter is not moving at all (ie speed is 0).

@BoredGuy1 BoredGuy1 changed the title Audio engine fix Changed audio engine to switch to linear scaler upon entering scratching mode Jan 16, 2026
Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, for all your testing with the engine. This fix looks reasonable.
Can you rebase it to the 2.5 branch? This way it will go to all actively maintained branches.
You can than edit the merge target in this PR.

@BoredGuy1
Copy link
Contributor Author

Thanks, guys. Can we also get a look at #15792 while or after this gets approved?

@daschuer daschuer merged commit 702bb42 into mixxxdj:2.5 Jan 30, 2026
13 checks passed
@acolombier acolombier added this to the 2.5.5 milestone Feb 25, 2026
@github-project-automation github-project-automation bot moved this to Done in Releases Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants