diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-11-05 02:13:49 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-11-05 02:13:49 +0000 |
commit | 1aaebc43c3373e2a46f6acbc020f2f24a5021635 (patch) | |
tree | 8a2dfa2ae0bcb4247c89f78553e5d69687291ec6 /libs/ardour | |
parent | 6d07b590bb05caf50397f9026db1bc1e91f9a2d8 (diff) |
save & restore seamless loop setting when setting sync source, since JACK does not allow seamless looping (and actually, looping with JACK is totally broken right now
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6019 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/session.h | 1 | ||||
-rw-r--r-- | libs/ardour/session_state.cc | 3 | ||||
-rw-r--r-- | libs/ardour/session_transport.cc | 13 |
3 files changed, 14 insertions, 3 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 2b44eb5ac2..31a744383d 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1060,6 +1060,7 @@ class Session : public PBD::StatefulDestructible float _meter_hold; float _meter_falloff; bool _end_location_is_free; + bool _was_seamless; void set_worst_io_latencies (); void set_worst_io_latencies_x (IOChange asifwecare, void *ignored) { diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index e01703636e..fe465462fb 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -170,12 +170,13 @@ Session::first_stage_init (string fullpath, string snapshot_name) current_block_size = 0; solo_update_disabled = false; currently_soloing = false; + _was_seamless = Config->get_seamless_loop (); _have_captured = false; _worst_output_latency = 0; _worst_input_latency = 0; _worst_track_latency = 0; _state_of_the_state = StateOfTheState(CannotSave|InitialConnecting|Loading); - + _slave = 0; _silent = false; session_send_mmc = false; diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index 37c60b8105..7c2eba1a61 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -62,11 +62,20 @@ void Session::request_slave_source (SlaveSource src) { Event* ev = new Event (Event::SetSlaveSource, Event::Add, Event::Immediate, 0, 0.0); + bool seamless; + + seamless = Config->get_seamless_loop (); if (src == JACK) { - /* could set_seamless_loop() be disposed of entirely?*/ + /* JACK cannot support seamless looping at present */ Config->set_seamless_loop (false); - } + } else { + /* reset to whatever the value was before we last switched slaves */ + Config->set_seamless_loop (_was_seamless); + } + + /* save value of seamless from before the switch */ + _was_seamless = seamless; ev->slave = src; queue_event (ev); |