13
0

Revert incorrect region_length() definition.

This commit is contained in:
nick_m 2015-05-16 04:50:37 +10:00
parent 68a8330afc
commit c8303c8b7e
2 changed files with 3 additions and 3 deletions

View File

@ -2800,7 +2800,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
if (arv) {
boost::shared_ptr<AudioRegion> ar (arv->audio_region());
framecnt_t len = ar->fade_out()->back()->when;
framecnt_t diff = ar->last_frame() - i->initial_end;
framecnt_t diff = 1 + ar->last_frame() - i->initial_end;
framepos_t new_length = len + diff;
i->anchored_fade_length = min (ar->length(), new_length);
//i->anchored_fade_length = ar->verify_xfade_bounds (new_length, false /*END*/ );

View File

@ -139,7 +139,7 @@ class LIBARDOUR_API Region
/* first_frame() is an alias; last_frame() just hides some math */
framepos_t first_frame () const { return _position; }
framepos_t last_frame () const { return _position + _length; }
framepos_t last_frame () const { return _position + _length - 1; }
/** Return the earliest possible value of _position given the
* value of _start within the region's sources
@ -151,7 +151,7 @@ class LIBARDOUR_API Region
framepos_t latest_possible_frame () const;
Evoral::Range<framepos_t> last_range () const {
return Evoral::Range<framepos_t> (_last_position, _last_position + _last_length);
return Evoral::Range<framepos_t> (_last_position, _last_position + _last_length - 1);
}
Evoral::Range<framepos_t> range () const {