summaryrefslogtreecommitdiff
path: root/libs/ardour/session_transport.cc
diff options
context:
space:
mode:
authorJesse Chappell <jesse@essej.net>2007-06-26 02:15:02 +0000
committerJesse Chappell <jesse@essej.net>2007-06-26 02:15:02 +0000
commit4ecfc19541ed05c5e51c367556e9902c7f83b705 (patch)
tree8b1f73f6aa8154cf30a3b88553262407c7bfa03a /libs/ardour/session_transport.cc
parent4431b678239182a85310d4aba4b4f66c6a7cd06b (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_transport.cc')
-rw-r--r--libs/ardour/session_transport.cc29
1 files changed, 25 insertions, 4 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 22d30fda9d..c5cbae11c9 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -381,7 +381,8 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
_transport_frame = last_stop_frame;
- if (synced_to_jack()) {
+ if (synced_to_jack() && !play_loop) {
+ // cerr << "non-realtimestop: transport locate to " << _transport_frame << endl;
_engine.transport_locate (_transport_frame);
}
}
@@ -420,14 +421,16 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
/* XXX its a little odd that we're doing this here
when realtime_stop(), which has already executed,
will have done this.
+ JLC - so let's not because it seems unnecessary and breaks loop record
*/
-
+#if 0
if (!Config->get_latched_record_enable()) {
g_atomic_int_set (&_record_status, Disabled);
} else {
g_atomic_int_set (&_record_status, Enabled);
}
RecordStateChanged (); /* emit signal */
+#endif
}
if ((post_transport_work & PostTransportLocate) && get_record_enabled()) {
@@ -613,7 +616,7 @@ Session::start_locate (nframes_t target_frame, bool with_roll, bool with_flush,
void
Session::locate (nframes_t target_frame, bool with_roll, bool with_flush, bool with_loop)
{
- if (actively_recording()) {
+ if (actively_recording() && !with_loop) {
return;
}
@@ -704,6 +707,22 @@ Session::locate (nframes_t target_frame, bool with_roll, bool with_flush, bool w
// cancel looping directly, this is called from event handling context
set_play_loop (false);
}
+ else if (al && _transport_frame == al->start()) {
+ if (with_loop) {
+ // this is only necessary for seamless looping
+
+ boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
+
+ for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
+ if ((*i)->record_enabled ()) {
+ // tell it we've looped, so it can deal with the record state
+ (*i)->transport_looped(_transport_frame);
+ }
+ }
+ }
+
+ TransportLooped(); // EMIT SIGNAL
+ }
}
loop_changing = false;
@@ -874,7 +893,9 @@ Session::start_transport ()
break;
case Recording:
- disable_record (false);
+ if (!play_loop) {
+ disable_record (false);
+ }
break;
default: