[stock/gruvin9x] Better synchro when the mixer duration increases! Safety check on mixer interval.
This commit is contained in:
@@ -104,11 +104,13 @@ BYTE CardType; /* Card type flags */
|
||||
#else
|
||||
inline void checkMixer()
|
||||
{
|
||||
// TODO duplicated code ...
|
||||
uint16_t t0 = getTmr16KHz();
|
||||
int16_t delta = t0 - nextMixerTime;
|
||||
if (delta < 0) return;
|
||||
int16_t delta = (nextMixerEndTime - lastMixerDuration) - t0;
|
||||
if (delta > 0 && delta < MAX_MIXER_DELTA) return;
|
||||
|
||||
nextMixerEndTime = t0 + MAX_MIXER_DELTA;
|
||||
|
||||
nextMixerTime = t0 + 20*16;
|
||||
doMixerCalculations();
|
||||
|
||||
t0 = getTmr16KHz() - t0;
|
||||
|
||||
Reference in New Issue
Block a user