From 7d350441ccb092bf5271b0e92162c8c54eca8a1d Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Tue, 10 Dec 2013 21:47:26 +0000 Subject: [PATCH] -Tempo Tap button UI freeze now fixed #62 --- src/timemanager.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/timemanager.cxx b/src/timemanager.cxx index 8dcd3bf..8a9606f 100644 --- a/src/timemanager.cxx +++ b/src/timemanager.cxx @@ -105,14 +105,14 @@ void TimeManager::registerObserver(TimeObserver* o) void TimeManager::tap() { // reset tap tempo to "first tap" if more than 5 secs elapsed since last tap - if ( tapTempo[0] < frame - samplerate * 5 ) + if ( tapTempo[0] < totalFrameCounter - samplerate * 5 ) { tapTempoPos = 0; } if ( tapTempoPos < 3 ) { - tapTempo[tapTempoPos] = frame; + tapTempo[tapTempoPos] = totalFrameCounter; tapTempoPos++; } else @@ -120,7 +120,7 @@ void TimeManager::tap() // calculate frames per tap int tapFpb1 = tapTempo[1] - tapTempo[0]; int tapFpb2 = tapTempo[2] - tapTempo[1]; - int tapFpb3 = frame - tapTempo[2]; // last tap, until now + int tapFpb3 = totalFrameCounter - tapTempo[2]; // last tap, until now int average = (tapFpb1 + tapFpb2 + tapFpb3) / 3;