diff options
author | Jesse Chappell <jesse@essej.net> | 2007-06-26 02:15:02 +0000 |
---|---|---|
committer | Jesse Chappell <jesse@essej.net> | 2007-06-26 02:15:02 +0000 |
commit | 4ecfc19541ed05c5e51c367556e9902c7f83b705 (patch) | |
tree | 8b1f73f6aa8154cf30a3b88553262407c7bfa03a /libs/ardour/session.cc | |
parent | 4431b678239182a85310d4aba4b4f66c6a7cd06b (diff) |
* Added (let's call it revealed) ability to record while the transport is looping.
This works for both Internal (seamless) and JACK sync, new regions
are created each cycle around the loop and stacked on top of each other.
It is recommended for now that automatic crossfades be turned off when doing this.
Punch-In/Out may be used also (this used to be the only way to accomplish recording
while looping, but now the GUI represents it without goofiness.
* Fixed the stuttering/stuck problem when looping with JACK sync
* Fixed gui bug that prevented record-disable when latch record option is on
* Fixed issue where it would rec-enable unnecessarily when passing through the punch-out point
* Fixed corner case in diskstream record length (that no one would ever notice)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2034 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index c2c21a631d..7c23ae6286 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1259,7 +1259,7 @@ Session::disable_record (bool rt_context, bool force) if ((rs = (RecordState) g_atomic_int_get (&_record_status)) != Disabled) { - if (!Config->get_latched_record_enable () || force) { + if ((!Config->get_latched_record_enable () && !play_loop) || force) { g_atomic_int_set (&_record_status, Disabled); } else { if (rs == Recording) { @@ -1290,15 +1290,18 @@ Session::disable_record (bool rt_context, bool force) void Session::step_back_from_record () { - g_atomic_int_set (&_record_status, Enabled); + /* XXX really atomic compare+swap here */ + if (g_atomic_int_get (&_record_status) == Recording) { + g_atomic_int_set (&_record_status, Enabled); - if (Config->get_monitoring_model() == HardwareMonitoring) { - boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if (Config->get_auto_input() && (*i)->record_enabled ()) { - //cerr << "switching from input" << __FILE__ << __LINE__ << endl << endl; - (*i)->monitor_input (false); + if (Config->get_monitoring_model() == HardwareMonitoring) { + boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader(); + + for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { + if (Config->get_auto_input() && (*i)->record_enabled ()) { + //cerr << "switching from input" << __FILE__ << __LINE__ << endl << endl; + (*i)->monitor_input (false); + } } } } |