summaryrefslogtreecommitdiff
path: root/gtk2_ardour/tempo_dialog.h
diff options
context:
space:
mode:
authorColin Fletcher <colin.m.fletcher@googlemail.com>2015-03-19 19:44:20 +0000
committerColin Fletcher <colin.m.fletcher@googlemail.com>2015-03-21 12:19:25 +0000
commitee959e73fd02c5eefc56a27d23e9ce847b0fab55 (patch)
tree93096a8630b97f0f06e8016128fd1ca7391def48 /gtk2_ardour/tempo_dialog.h
parent37b0e8ac90aae8d5359f67a7a32bfe78ad6422af (diff)
tap-tempo: try to make it work properly from the very first click
Diffstat (limited to 'gtk2_ardour/tempo_dialog.h')
-rw-r--r--gtk2_ardour/tempo_dialog.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/tempo_dialog.h b/gtk2_ardour/tempo_dialog.h
index 67e6e6ec76..97d89e2867 100644
--- a/gtk2_ardour/tempo_dialog.h
+++ b/gtk2_ardour/tempo_dialog.h
@@ -54,12 +54,14 @@ private:
bool entry_key_release (GdkEventKey* );
void pulse_change ();
bool tap_tempo_button_press (GdkEventButton* );
+ bool tap_tempo_focus_out (GdkEventFocus* );
typedef std::map<std::string,float> NoteTypes;
NoteTypes note_types;
- guint32 last_tap;
- double average_interval;
+ bool tapped; // whether the tap-tempo button has been clicked
+ guint32 last_tap; // time of the last tap (in mS, from GdkEventButton::time). Only valid if tapped is true
+ double average_interval; // running average of tap tempo button press interval times
Gtk::ComboBoxText pulse_selector;
Gtk::Adjustment bpm_adjustment;