EngineBuffer: Reset sample counter after indicator update#16245
EngineBuffer: Reset sample counter after indicator update#16245alajovic wants to merge 1 commit intomixxxdj:2.5from
Conversation
8fa2556 to
bef0af3
Compare
|
Eh. Missed the fact that this member variable had been renamed between 2.5 and 2.6, and I committed the fix with 2.6 name to 2.5. Surprise – it didn't build. Fixed that now. |
|
Thank you. |
|
@ronso0 Fair point, but that's a separate issue. The mapping itself is in need of a modernization. I have recently gotten a DDJ-SX and mixxx logged warnings becuse the mapping was still using That sample counter is a parallel issue — the counter exists, but it starts off uninitialized (it's assigned only in setNewPlaypos) and is never reset. I think there's a fair chance that the respective code was simply lost during refactoring. |
|
I agree to both. Will take a look at this soonish. |
|
Though CI fails (on some targets onl??) because the engine somehow relies on the current behavior? |
|
Maybe we need to keep |
|
|
|
Some CI targets indeed failed, and the pattern seems random. Almost as if it were some kind of a timing issue. 😁 I'll look into this. |
|
Tests assume that a call to Not sure how to proceed. On one hand, it sounds sensible to keep |
|
@alajovic you're right, ¹ corresponds to buffer size, or "engine process rate", which may be up to 750 Hz with minimal buffer of 1.33 ms Btw IIUC this also calls
@alajovic as a quick fix for your mapping issue I suggest you move @daschuer maybe you can shed a light on this? |
Playpos indicator updates in EngineBuffer are supposed to happen with a rate of 15 Hz:
mixxx/src/engine/enginebuffer.cpp
Line 53 in 3ebac44
There is a counter that takes track of this:
mixxx/src/engine/enginebuffer.h
Line 379 in 3ebac44
but it is never reset after an update:
mixxx/src/engine/enginebuffer.cpp
Lines 1477 to 1482 in 3ebac44
As a result, playpos updates are issued at a rate much faster than 15 Hz. I noticed this because the DDJ-SX mapping relies on those 15 Hz to blink the jog dial when the end of a track approaches, and the blinking was way too fast and erratic.
It seems that the counter reset was accidentally removed in 5a4444d. I added it back. The issue is present both in 2.5 and 2.6, so the fix targets 2.5.