GUI action Transport/RecordCountIn
authorRobin Gareus <robin@gareus.org>
Mon, 13 Feb 2017 21:59:51 +0000 (22:59 +0100)
committerRobin Gareus <robin@gareus.org>
Mon, 13 Feb 2017 22:01:11 +0000 (23:01 +0100)
gtk2_ardour/ardour.menus.in
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui.h
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/editor.h
gtk2_ardour/editor_ops.cc
gtk2_ardour/public_editor.h

index b579e7d2a16a69dbdf8c8349accf96b375b8ccba..5c43175f20800578c51904ca9af697d9ded0caae 100644 (file)
@@ -75,6 +75,7 @@
       <menuitem action='ToggleRollForgetCapture'/>
       <menuitem action='Record'/>
       <menuitem action='RecordPreroll'/>
+      <menuitem action='RecordCountIn'/>
 #if 0
       <menuitem action='toggle-skip-playback'/>
 #endif
index b0feef368619f5cd29952beac917b400f04aa88e..8700f59d4f95af968613032442fab0fb75cf4706 100644 (file)
@@ -2397,6 +2397,15 @@ ARDOUR_UI::transport_rec_preroll ()
        editor->rec_with_preroll ();
 }
 
+void
+ARDOUR_UI::transport_rec_count_in ()
+{
+       if (!_session) {
+               return;
+       }
+       editor->rec_with_count_in ();
+}
+
 void
 ARDOUR_UI::transport_rewind (int option)
 {
index 27bdf4bcc4bb7d7639c065a4b8b9289343db685c..170dbe994888172606fef44132306e2dab7663a5 100644 (file)
@@ -666,6 +666,7 @@ private:
        void transport_play_selection();
        void transport_play_preroll();
        void transport_rec_preroll();
+       void transport_rec_count_in();
        void transport_forward (int option);
        void transport_rewind (int option);
        void transport_loop ();
index 1b14cba012e0dc66d1a2e28e38eb216f37d94a72..1cca283900f9e129e86c03df55cf465f987b8515 100644 (file)
@@ -474,6 +474,10 @@ ARDOUR_UI::install_actions ()
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
 
+       act = global_actions.register_action (transport_actions, X_("RecordCountIn"), _("Record w/Count-In"), sigc::mem_fun(*this, &ARDOUR_UI::transport_rec_count_in));
+       ActionManager::session_sensitive_actions.push_back (act);
+       ActionManager::write_sensitive_actions.push_back (act);
+
        act = global_actions.register_action (transport_actions, X_("Record"), _("Enable Record"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_record), false));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
index fa5ed9057a2cc67309683414c19b5b5d581dc430..46562a76b89dceebdf53d5a8145050360604f0b4 100644 (file)
@@ -263,6 +263,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void maybe_locate_with_edit_preroll (framepos_t);
        void play_with_preroll ();
        void rec_with_preroll ();
+       void rec_with_count_in ();
        void select_all_in_track (Selection::Operation op);
        void select_all_objects (Selection::Operation op);
        void invert_selection_in_track ();
index 93a4571d8957bfad3924774b9513264804c5d1bf..1db9ce4423cbd563ecccedeb9aff3a3647b90f87 100644 (file)
@@ -2670,6 +2670,11 @@ Editor::rec_with_preroll ()
        _session->request_preroll_record_trim (ph, preroll);
 }
 
+void
+Editor::rec_with_count_in ()
+{
+       _session->request_count_in_record ();
+}
 
 void
 Editor::play_location (Location& location)
index 7516d48099ea07396fe3cebf391941d621b1c3eb..38b977171b7a2d3be9299c600554a82858ce582a 100644 (file)
@@ -211,6 +211,7 @@ class PublicEditor : public Gtkmm2ext::Tabbable {
        virtual void play_selection () = 0;
        virtual void play_with_preroll () = 0;
        virtual void rec_with_preroll () = 0;
+       virtual void rec_with_count_in () = 0;
        virtual void maybe_locate_with_edit_preroll (framepos_t location) = 0;
        virtual void goto_nth_marker (int nth) = 0;
        virtual void trigger_script (int nth) = 0;