Skip to content

Commit 41819e9

Browse files
committed
Sequencer: bugfix for randomly skipped / missed steps
1 parent 6e3a32f commit 41819e9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Assets/Scripts/Sequencer/sequencerCVDeviceInterface.cs

+6
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,14 @@ private void OnAudioFilterRead(float[] buffer, int channels)
335335
int selectedStep = 0;
336336
void UpdateStepSelect()
337337
{
338+
// bugfix for randomly skipped / missed steps.
339+
// this routine would fire even if the step selector handle was not touched or grabbed.
340+
// this could be due to an multithread issue between main and audio thread, which is still unsolved.
341+
if (stepSelect.curState != manipObject.manipState.grabbed) return;
342+
338343
int s = (int)Mathf.Round(stepSelect.transform.localPosition.x / -cubeConst);
339344
if (s == selectedStep) return;
345+
//Debug.Log("step dragged");
340346
stepSelect.pulse();
341347
selectedStep = s;
342348
SelectStep(s);

0 commit comments

Comments
 (0)