diff options
author | Jesse Chappell <jesse@essej.net> | 2007-06-26 02:16:54 +0000 |
---|---|---|
committer | Jesse Chappell <jesse@essej.net> | 2007-06-26 02:16:54 +0000 |
commit | e9b1b7110ba49103af8e99547c3a165526a80b14 (patch) | |
tree | f6eac5ae42f48605df6167bdc9a12421bdbe103b /libs/ardour/session_transport.cc | |
parent | cdccec62fe0ec32c8f4ae1efd3d2ab70dae19dfc (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/trunk@2035 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_transport.cc')
-rw-r--r-- | libs/ardour/session_transport.cc | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index 60cc8b91ae..7deb40c161 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -386,7 +386,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); } } @@ -422,14 +423,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()) { @@ -615,7 +618,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; } @@ -711,6 +714,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; @@ -893,7 +912,9 @@ Session::start_transport () break; case Recording: - disable_record (false); + if (!play_loop) { + disable_record (false); + } break; default: |