"slip_resync" control
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mixxx |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Running Mixxx 2.0.0 (build 1.12 r5772) on Windows 10
Discovered while attempting to create a mapping for the Behringer CMD Studio 4a. (Be-ing on GitHub requested I report this).
In my mapping I was trying to "re-sync" slip playback (i.e. slip was already active) by doing this in a single JS button "call-back" function:
engine.
engine.
This had no effect. It seems that flipping this parameter, (perhaps all parameters??), in the same function (i.e. without returning to Mixxx first), has no effect, or more likely, only the last call will have an effect? (so that in this case I was just setting slip_enable to 1, and it was already set to 1 before the function was called so had no effect?) I'm guessing here that parameter change processing only happens when a JS function returns to Mixxx??
Since there is no other way to "re-sync" slip-playback I was forced to work-around this problem using a very short on-shot timer like this:
engine.
engine.
This works but is incredibly ugly (and I suspect most people who need to do this sort of parameter flipping won't think of this).
I think there are 2 possible solutions to this:
1) The engine.setValue() call be altered so that it does the right thing, (e.g. triggers at least one round of parameter processing when called so that any "reset" behaviour works as expected when flipping param values).
2) A "special case" call/param be added that "re-syncs" slip-playback without needing to flip slip_enable off then on again. (I'm new to Mixxx so don't know how common this problem is, perhaps slip_enable is the only parameter where this is a problem??)
summary: |
- Repeated calls to engine.SetValue() in the same JS "call-back" are not - handled properly. + "slip_resync" control |
Changed in mixxx: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
The way slip_enabled works is particularly vulnerable to this since you have to enable slip and then the audio processing engine has to run its callback and notice that you changed it. If you change it then immediately change it back, there's a race.
Some major restructuring of our engine has to happen to fix this -- I'm interested in doing it but it's not going to get done anytime soon (it's a really big project).
It's not particularly related to the fact that you do both sets in one callback. Even with your timer workaround there's still a race condition that you set it to 0 and then back to 1 before the engine processes the 0. Basically, you can't use slip_enabled in this way (to "resync" the slip). We would need to add a dedicated control to provide this (your option #2).