Fix some race conditions around loops and beatloops.#937
Conversation
|
Tests seem to segfault: |
|
Program received signal SIGSEGV, Segmentation fault. |
|
Segfault fixed |
| if (loopSamples.end != kNoTrigger && | ||
| (loopSamples.end - pos) < MINIMUM_AUDIBLE_LOOP_SIZE) { | ||
| if (closestBeat != -1 && m_pBeats) { | ||
| pos = static_cast<int>(floor(m_pBeats->findNthBeat(closestBeat, -2))); |
There was a problem hiding this comment.
Any particular reason for the change in logic here? (looking backward -2 instead of forward by 2)
Would this work with a beatmap positioned at the start of the song?
There was a problem hiding this comment.
Also -- same question here regarding no longer using s_dBeatSizes[0].
There was a problem hiding this comment.
The same here, 1/8 beats is only a guess and in most cases wrong.
There was a problem hiding this comment.
Any particular reason for the change in logic here? (looking backward -2 instead of forward by 2)
The old code was wrong for beat maps since it looks forward for the next beat but moves the loop in point back by
the amount of frames. Now we really hit the beat before.
Would this work with a beatmap positioned at the start of the song?
No, you cannot set a quantization loop in the region outside the beatmap. In this case we hit the condition below and get a minimum loop.
Ain't that the truth! Thanks for working on this. |
|
LGTM -- thanks for the fixes! |
This fixes the underlying issue of
https://bugs.launchpad.net/mixxx/+bug/1576819
This fixes also some, but not all race conditions of
https://bugs.launchpad.net/mixxx/+bug/1212952
To fix ll race conditions, we need to rework all code.