X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fsurfaces%2Fcontrol_protocol%2Fbasic_ui.cc;h=44445192be017b44875c19a1ee29700001ce1b40;hb=185be4e841e182bbe7cb7820f9cb6371ebebe15d;hp=3dc93cc64ad980070886d6215a613b25a5288260;hpb=25d1670a61d19e795227b939a98be9cf5a050c67;p=ardour.git diff --git a/libs/surfaces/control_protocol/basic_ui.cc b/libs/surfaces/control_protocol/basic_ui.cc index 3dc93cc64a..44445192be 100644 --- a/libs/surfaces/control_protocol/basic_ui.cc +++ b/libs/surfaces/control_protocol/basic_ui.cc @@ -16,7 +16,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #include @@ -29,6 +28,7 @@ #include "i18n.h" using namespace ARDOUR; +using ARDOUR::nframes_t; BasicUI::BasicUI (Session& s) : session (&s) @@ -54,10 +54,10 @@ BasicUI::register_thread (std::string name) void BasicUI::loop_toggle () { - if (session->get_auto_loop()) { - session->request_auto_loop (false); + if (session->get_play_loop()) { + session->request_play_loop (false); } else { - session->request_auto_loop (true); + session->request_play_loop (true); if (!session->transport_rolling()) { session->request_transport_speed (1.0); } @@ -79,7 +79,7 @@ BasicUI::goto_end () void BasicUI::add_marker () { - jack_nframes_t when = session->audible_frame(); + nframes_t when = session->audible_frame(); session->locations()->add (new Location (when, when, _("unnamed"), Location::IsMark)); } @@ -106,8 +106,8 @@ BasicUI::transport_play (bool from_last_start) { bool rolling = session->transport_rolling (); - if (session->get_auto_loop()) { - session->request_auto_loop (false); + if (session->get_play_loop()) { + session->request_play_loop (false); } if (session->get_play_range ()) { @@ -208,13 +208,13 @@ BasicUI::toggle_all_rec_enables () void BasicUI::toggle_punch_in () { - session->set_punch_in (!session->get_punch_in()); + Config->set_punch_in (!Config->get_punch_in()); } void BasicUI::toggle_punch_out () { - session->set_punch_out (!session->get_punch_out()); + Config->set_punch_out (!Config->get_punch_out()); } bool @@ -233,14 +233,14 @@ BasicUI::set_record_enable (bool yn) } } -jack_nframes_t +nframes_t BasicUI::transport_frame () { return session->transport_frame(); } void -BasicUI::locate (jack_nframes_t where, bool roll_after_locate) +BasicUI::locate (nframes_t where, bool roll_after_locate) { session->request_locate (where, roll_after_locate); } @@ -257,26 +257,26 @@ BasicUI::locked () return session->transport_locked (); } -jack_nframes_t +nframes_t BasicUI::smpte_frames_per_hour () { return session->smpte_frames_per_hour (); } void -BasicUI::smpte_time (jack_nframes_t where, SMPTE::Time& smpte) +BasicUI::smpte_time (nframes_t where, SMPTE::Time& smpte) { session->smpte_time (where, *((SMPTE::Time *) &smpte)); } void -BasicUI::smpte_to_sample (SMPTE::Time& smpte, jack_nframes_t& sample, bool use_offset, bool use_subframes) const +BasicUI::smpte_to_sample (SMPTE::Time& smpte, nframes_t& sample, bool use_offset, bool use_subframes) const { session->smpte_to_sample (*((SMPTE::Time*)&smpte), sample, use_offset, use_subframes); } void -BasicUI::sample_to_smpte (jack_nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes) const +BasicUI::sample_to_smpte (nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes) const { session->sample_to_smpte (sample, *((SMPTE::Time*)&smpte), use_offset, use_subframes); }