fix thinko in playlist constructor for cut and copy
git-svn-id: svn://localhost/ardour2/branches/3.0@9541 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
819faa3b0b
commit
aa6adacc75
@ -205,31 +205,30 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, fram
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case OverlapStart:
|
case OverlapStart: {
|
||||||
{
|
position = region->position() - start;
|
||||||
if (region->fade_in()->back()->when > 0) {
|
len = end - region->position();
|
||||||
fade_in = region->fade_in()->back()->when;
|
|
||||||
}
|
if (end > region->position() + region->fade_in().back()->when)
|
||||||
if (start > region->last_frame() - region->fade_out()->back()->when) {
|
fade_in_len = region->fade_in().back()->when; //end is after fade-in, preserve the fade-in
|
||||||
fade_out = region->last_frame() - start;
|
if (end > region->last_frame() - region->fade_out().back()->when)
|
||||||
}
|
fade_out_len = region->fade_out().back()->when - ( region->last_frame() - end ); //end is inside the fadeout, preserve the fades endpoint
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case OverlapEnd: {
|
||||||
|
position = 0;
|
||||||
|
offset = start - region->position();
|
||||||
|
len = region->length() - offset;
|
||||||
|
|
||||||
case OverlapEnd:
|
if (start < region->last_frame() - region->fade_out().back()->when) //start is before fade-out, preserve the fadeout
|
||||||
{
|
fade_out_len = region->fade_out().back()->when;
|
||||||
framecnt_t const offset = start - region->position();
|
|
||||||
if (region->fade_in()->back()->when > offset) {
|
if (start < region->position() + region->fade_in().back()->when)
|
||||||
fade_in = region->fade_in()->back()->when - offset;
|
fade_in_len = region->fade_in().back()->when - (start - region->position()); //end is inside the fade-in, preserve the fade-in endpoint
|
||||||
}
|
|
||||||
if (start > region->last_frame() - region->fade_out()->back()->when) {
|
|
||||||
fade_out = region->last_frame() - start;
|
|
||||||
} else {
|
|
||||||
fade_out = region->fade_out()->back()->when;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case OverlapExternal:
|
case OverlapExternal:
|
||||||
fade_in = region->fade_in()->back()->when;
|
fade_in = region->fade_in()->back()->when;
|
||||||
fade_out = region->fade_out()->back()->when;
|
fade_out = region->fade_out()->back()->when;
|
||||||
|
Loading…
Reference in New Issue
Block a user