diff options
author | Carl Hetherington <carl@carlh.net> | 2009-02-02 17:11:51 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-02-02 17:11:51 +0000 |
commit | 633629b2b1590b687a79990fe1fb0df35301e709 (patch) | |
tree | 4c0ec0ab556a1762f4cc81822ea4fec45d20ab8e | |
parent | 2f6327c11369ddb1c761553468aab231484b8bd6 (diff) |
Fix a couple of bugs causing unexpected movements of the playhead.
git-svn-id: svn://localhost/ardour2/branches/3.0@4480 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/ardour/session.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 862a8fb7e6..00fae6ac74 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -119,6 +119,7 @@ Session::Session (AudioEngine &eng, string mix_template) : _engine (eng), + _requested_return_frame (-1), _scratch_buffers(new BufferSet()), _silent_buffers(new BufferSet()), _mix_buffers(new BufferSet()), @@ -201,6 +202,7 @@ Session::Session (AudioEngine &eng, nframes_t initial_length) : _engine (eng), + _requested_return_frame (-1), _scratch_buffers(new BufferSet()), _silent_buffers(new BufferSet()), _mix_buffers(new BufferSet()), @@ -1214,16 +1216,16 @@ Session::audible_frame () const /* MOVING */ /* check to see if we have passed the first guaranteed - audible frame past our last stopping position. if not, - the return that last stopping point because in terms + audible frame past our last start position. if not, + return that last start point because in terms of audible frames, we have not moved yet. */ if (_transport_speed > 0.0f) { if (!play_loop || !have_looped) { - if (tf < last_stop_frame + offset) { - return last_stop_frame; + if (tf < _last_roll_location + offset) { + return _last_roll_location; } } @@ -1236,8 +1238,8 @@ Session::audible_frame () const /* XXX wot? no backward looping? */ - if (tf > last_stop_frame - offset) { - return last_stop_frame; + if (tf > _last_roll_location - offset) { + return _last_roll_location; } else { /* backwards */ ret += offset; |