Fix and simplify Playlist::fade_range for multiple ranges
This commit is contained in:
parent
6b5582deef
commit
46f61d7662
@ -3413,17 +3413,14 @@ Playlist::fade_range (list<TimelineRange>& ranges)
|
|||||||
{
|
{
|
||||||
ThawList thawlist;
|
ThawList thawlist;
|
||||||
RegionReadLock rlock (this);
|
RegionReadLock rlock (this);
|
||||||
for (list<TimelineRange>::iterator r = ranges.begin(); r != ranges.end(); ) {
|
/* add regions only once, not for each range */
|
||||||
list<TimelineRange>::iterator tmpr = r;
|
for (auto const& r : regions) {
|
||||||
++tmpr;
|
thawlist.add (r);
|
||||||
for (RegionList::const_iterator i = regions.begin (); i != regions.end ();) {
|
}
|
||||||
RegionList::const_iterator tmpi = i;
|
for (auto const& t: ranges) {
|
||||||
++tmpi;
|
for (auto const& r : regions) {
|
||||||
thawlist.add (*i);
|
r->fade_range (t.start().samples(), t.end().samples());
|
||||||
(*i)->fade_range ((*r).start().samples(), (*r).end().samples());
|
|
||||||
i = tmpi;
|
|
||||||
}
|
}
|
||||||
r = tmpr;
|
|
||||||
}
|
}
|
||||||
rlock.release ();
|
rlock.release ();
|
||||||
thawlist.release ();
|
thawlist.release ();
|
||||||
|
Loading…
Reference in New Issue
Block a user