diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-20 01:43:54 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-20 01:43:54 +0000 |
commit | a13d2196c8c40350e90cba061e3f66e2a65a65dd (patch) | |
tree | 8ff443835c34c774768cb5dd56a577ac6bc408bd | |
parent | 82b4c84e1d7de7e90fb65775d45154d1319a4309 (diff) |
do not start transport on first locate if auto-play is on; wait till GUI says its OK
git-svn-id: svn://localhost/ardour2/trunk@1630 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 2 | ||||
-rw-r--r-- | libs/ardour/session_state.cc | 1 | ||||
-rw-r--r-- | libs/ardour/session_transport.cc | 10 |
4 files changed, 14 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 2c5ad6f81c..c2fc2cd027 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2583,6 +2583,9 @@ ARDOUR_UI::save_keybindings () bool ARDOUR_UI::first_idle () { + if (session) { + session->allow_auto_play (true); + } can_save_keybindings = true; return false; } diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 5beaee8e33..6324dd5278 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -358,6 +358,7 @@ class Session : public PBD::StatefulDestructible void set_session_start (nframes_t start) { start_location->set_start(start); } void set_session_end (nframes_t end) { end_location->set_start(end); _end_location_is_free = false; } void use_rf_shuttle_speed (); + void allow_auto_play (bool yn); void request_transport_speed (float speed); void request_overwrite_buffer (Diskstream*); void request_diskstream_speed (Diskstream&, float speed); @@ -984,6 +985,7 @@ class Session : public PBD::StatefulDestructible volatile float _transport_speed; volatile float _desired_transport_speed; float _last_transport_speed; + bool auto_play_legal; nframes_t _last_slave_transport_frame; nframes_t maximum_output_latency; nframes_t last_stop_frame; diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index c1794b3210..ec170d728c 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -131,6 +131,7 @@ Session::first_stage_init (string fullpath, string snapshot_name) insert_cnt = 0; _transport_speed = 0; _last_transport_speed = 0; + auto_play_legal = false; transport_sub_state = 0; _transport_frame = 0; last_stop_frame = 0; diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index c0468a63ca..950d74edec 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -639,7 +639,7 @@ Session::locate (nframes_t target_frame, bool with_roll, bool with_flush, bool w } } - if (transport_rolling() && !Config->get_auto_play() && !with_roll && !(synced_to_jack() && play_loop)) { + if (transport_rolling() && (!auto_play_legal || Config->get_auto_play()) && !with_roll && !(synced_to_jack() && play_loop)) { realtime_stop (false); } @@ -924,7 +924,7 @@ Session::post_transport () if (post_transport_work & PostTransportLocate) { - if (((Config->get_slave_source() == None && Config->get_auto_play()) && !_exporting) || (post_transport_work & PostTransportRoll)) { + if (((Config->get_slave_source() == None && (auto_play_legal && Config->get_auto_play())) && !_exporting) || (post_transport_work & PostTransportRoll)) { start_transport (); } else { @@ -1249,3 +1249,9 @@ Session::update_latency_compensation_proxy (void* ignored) { update_latency_compensation (false, false); } + +void +Session::allow_auto_play (bool yn) +{ + auto_play_legal = yn; +} |