summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-08-09 21:17:55 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-08-09 21:17:55 +0000
commitdb78ba19fff5bfeebe662ccc8bf5ef41d0b41b60 (patch)
tree61453957114704326f47cd977635e83086282f19 /libs
parent6e280d5cfcde76154c9199505d21c12c941772e8 (diff)
attempt to prevent dropping into record if rolling in reverse (should fix #4254)
git-svn-id: svn://localhost/ardour2/branches/3.0@9971 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/session.cc7
-rw-r--r--libs/ardour/session_transport.cc5
2 files changed, 11 insertions, 1 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 2be3af3c0f..631a20aac7 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -985,13 +985,18 @@ Session::handle_locations_changed (Locations::LocationList& locations)
void
Session::enable_record ()
{
+ if (_transport_speed < 0.0) {
+ /* no recording in reverse */
+ return;
+ }
+
while (1) {
RecordState rs = (RecordState) g_atomic_int_get (&_record_status);
if (rs == Recording) {
break;
}
-
+
if (g_atomic_int_compare_and_exchange (&_record_status, rs, Recording)) {
_last_record_location = _transport_frame;
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 5fc073d93e..ca6b4da319 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -958,6 +958,11 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state)
return;
}
+ if (actively_recording() && speed < 0.0) {
+ /* no reverse during recording */
+ return;
+ }
+
_target_transport_speed = fabs(speed);
/* 8.0 max speed is somewhat arbitrary but based on guestimates regarding disk i/o capability