Fix converter origins for computing region length.
git-svn-id: svn://localhost/ardour2/branches/3.0@8309 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1fd105fbd4
commit
fe879145fe
|
@ -141,7 +141,7 @@ MidiRegion::set_length_internal (framecnt_t len)
|
||||||
void
|
void
|
||||||
MidiRegion::update_length_beats ()
|
MidiRegion::update_length_beats ()
|
||||||
{
|
{
|
||||||
BeatsFramesConverter converter (_session.tempo_map(), _position - _start);
|
BeatsFramesConverter converter (_session.tempo_map(), _position);
|
||||||
_length_beats = converter.from (_length);
|
_length_beats = converter.from (_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ MidiRegion::set_position_internal (framepos_t pos, bool allow_bbt_recompute)
|
||||||
/* leave _length_beats alone, and change _length to reflect the state of things
|
/* leave _length_beats alone, and change _length to reflect the state of things
|
||||||
at the new position (tempo map may dictate a different number of frames
|
at the new position (tempo map may dictate a different number of frames
|
||||||
*/
|
*/
|
||||||
BeatsFramesConverter converter (_session.tempo_map(), _position - _start);
|
BeatsFramesConverter converter (_session.tempo_map(), _position);
|
||||||
Region::set_length_internal (converter.to (_length_beats));
|
Region::set_length_internal (converter.to (_length_beats));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user