Comment 1 for bug 1538200

Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: Repeated calls to engine.SetValue() in the same JS "call-back" are not handled properly.

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).