summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Loftis <ben@glw.com>2010-05-14 22:03:28 +0000
committerBen Loftis <ben@glw.com>2010-05-14 22:03:28 +0000
commitd092815d68b9131a0423cd583d8a3a766eeef1f7 (patch)
tree5ff9e25894912512eadf4a85746a70e13e62b63c
parent0f6e2b8e31a5adfeac1ec556ea1e3497380c44f1 (diff)
fix for clocks refusing to update when reverse-playback was used later in the session. from A3 svn 6999. fixes the bug but needs additional testing
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@7103 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/ardour/session.h1
-rw-r--r--libs/ardour/session.cc12
-rw-r--r--libs/ardour/session_state.cc1
-rw-r--r--libs/ardour/session_transport.cc3
4 files changed, 12 insertions, 5 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index a4787c8e67..2bd8d74bc5 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -1176,6 +1176,7 @@ class Session : public PBD::StatefulDestructible
bool save_config_options_predicate (ConfigVariableBase::Owner owner) const;
nframes_t _last_roll_location;
+ nframes_t _last_roll_or_reversal_location;
nframes_t _last_record_location;
bool pending_locate_roll;
nframes_t pending_locate_frame;
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index f246ca8c61..543f5f92c6 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -1449,14 +1449,16 @@ Session::audible_frame () const
audible frame past our last stopping position. if not,
the return that last stopping point because in terms
of audible frames, we have not moved yet.
+
+ `Start position' in this context means the time we last
+ either started or changed transport direction.
*/
if (_transport_speed > 0.0f) {
if (!play_loop || !have_looped) {
- if (tf < last_stop_frame + offset) {
- return last_stop_frame;
-
+ if (tf < _last_roll_or_reversal_location + offset) {
+ return _last_roll_or_reversal_location;
}
}
@@ -1468,8 +1470,8 @@ Session::audible_frame () const
/* XXX wot? no backward looping? */
- if (tf > last_stop_frame - offset) {
- return last_stop_frame;
+ if (tf > _last_roll_or_reversal_location - offset) {
+ return _last_roll_or_reversal_location;
} else {
/* backwards */
ret += offset;
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 781c8e1312..6e6309421c 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -160,6 +160,7 @@ Session::first_stage_init (string fullpath, string snapshot_name)
play_loop = false;
have_looped = false;
_last_roll_location = 0;
+ _last_roll_or_reversal_location = 0;
_last_record_location = 0;
pending_locate_frame = 0;
pending_locate_roll = false;
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index ce776ab4a9..3845e8cb81 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -931,6 +931,7 @@ Session::set_transport_speed (float speed, bool abort, bool clear_state)
if ((_transport_speed && speed * _transport_speed < 0.0f) || (_last_transport_speed * speed < 0.0f) || (_last_transport_speed == 0.0f && speed < 0.0f)) {
todo = PostTransportWork (todo | PostTransportReverse);
last_stop_frame = _transport_frame;
+ _last_roll_or_reversal_location = _transport_frame;
}
_last_transport_speed = _transport_speed;
@@ -1010,6 +1011,8 @@ void
Session::start_transport ()
{
_last_roll_location = _transport_frame;
+ _last_roll_or_reversal_location = _transport_frame;
+
have_looped = false;
/* if record status is Enabled, move it to Recording. if its