Fix split of midi regions after tempo / meter changes.
git-svn-id: svn://localhost/ardour2/branches/3.0@8308 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
76e7a89a51
commit
1fd105fbd4
|
@ -141,10 +141,8 @@ MidiRegion::set_length_internal (framecnt_t len)
|
||||||
void
|
void
|
||||||
MidiRegion::update_length_beats ()
|
MidiRegion::update_length_beats ()
|
||||||
{
|
{
|
||||||
cerr << name() << " Updating length beats, currently = " << _length_beats << " w/length = " << _length << endl;
|
BeatsFramesConverter converter (_session.tempo_map(), _position - _start);
|
||||||
BeatsFramesConverter converter (_session.tempo_map(), _position);
|
|
||||||
_length_beats = converter.from (_length);
|
_length_beats = converter.from (_length);
|
||||||
cerr << "\tnew value: " << _length_beats << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -1397,7 +1397,8 @@ Playlist::_split_region (boost::shared_ptr<Region> region, framepos_t playlist_p
|
||||||
|
|
||||||
{
|
{
|
||||||
PropertyList plist;
|
PropertyList plist;
|
||||||
|
|
||||||
|
plist.add (Properties::position, region->position ());
|
||||||
plist.add (Properties::length, before);
|
plist.add (Properties::length, before);
|
||||||
plist.add (Properties::name, before_name);
|
plist.add (Properties::name, before_name);
|
||||||
plist.add (Properties::left_of_split, true);
|
plist.add (Properties::left_of_split, true);
|
||||||
|
@ -1413,7 +1414,8 @@ Playlist::_split_region (boost::shared_ptr<Region> region, framepos_t playlist_p
|
||||||
|
|
||||||
{
|
{
|
||||||
PropertyList plist;
|
PropertyList plist;
|
||||||
|
|
||||||
|
plist.add (Properties::position, region->position() + before);
|
||||||
plist.add (Properties::length, after);
|
plist.add (Properties::length, after);
|
||||||
plist.add (Properties::name, after_name);
|
plist.add (Properties::name, after_name);
|
||||||
plist.add (Properties::right_of_split, true);
|
plist.add (Properties::right_of_split, true);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user