mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
NO-OP: whitespace
* Remove leading and trailing whitespace.
* use tabs to indent, space to align
/* prefer C-style comments like this,
* always use an asterisk on every line, this
* way small ASCII-graphics are always aligned
* using spaces after the asterisk.
*
* ^
* / \
* / \
* / \
* / \
* / \
* / /\ \
* /__/ \_/\_^__\
* A R D O U R
*
<< NO asterisk, there may be tabs :(
*
*/
This commit is contained in:
parent
9ec031cfce
commit
19a2d384fc
2 changed files with 634 additions and 662 deletions
|
|
@ -53,21 +53,21 @@ class Crossfade;
|
||||||
|
|
||||||
namespace Properties {
|
namespace Properties {
|
||||||
/* fake the type, since regions are handled by SequenceProperty which doesn't
|
/* fake the type, since regions are handled by SequenceProperty which doesn't
|
||||||
care about such things.
|
* care about such things.
|
||||||
*/
|
*/
|
||||||
LIBARDOUR_API extern PBD::PropertyDescriptor<bool> regions;
|
LIBARDOUR_API extern PBD::PropertyDescriptor<bool> regions;
|
||||||
}
|
}
|
||||||
|
|
||||||
class LIBARDOUR_API RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_ptr<Region> > >
|
class LIBARDOUR_API RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_ptr<Region> > >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RegionListProperty (Playlist&);
|
RegionListProperty (Playlist&);
|
||||||
|
|
||||||
RegionListProperty* clone () const;
|
RegionListProperty* clone () const;
|
||||||
void get_content_as_xml (boost::shared_ptr<Region>, XMLNode &) const;
|
void get_content_as_xml (boost::shared_ptr<Region>, XMLNode &) const;
|
||||||
boost::shared_ptr<Region> get_content_from_xml (XMLNode const &) const;
|
boost::shared_ptr<Region> get_content_from_xml (XMLNode const &) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RegionListProperty* create () const;
|
RegionListProperty* create () const;
|
||||||
|
|
||||||
/* copy construction only by ourselves */
|
/* copy construction only by ourselves */
|
||||||
|
|
@ -254,10 +254,10 @@ public:
|
||||||
|
|
||||||
void set_capture_insertion_in_progress (bool yn);
|
void set_capture_insertion_in_progress (bool yn);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class Session;
|
friend class Session;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
class RegionReadLock : public Glib::Threads::RWLock::ReaderLock {
|
class RegionReadLock : public Glib::Threads::RWLock::ReaderLock {
|
||||||
public:
|
public:
|
||||||
RegionReadLock (Playlist *pl) : Glib::Threads::RWLock::ReaderLock (pl->region_lock) {}
|
RegionReadLock (Playlist *pl) : Glib::Threads::RWLock::ReaderLock (pl->region_lock) {}
|
||||||
|
|
@ -410,12 +410,12 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void pre_uncombine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>) {}
|
virtual void pre_uncombine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RegionReadLock;
|
friend class RegionReadLock;
|
||||||
friend class RegionWriteLock;
|
friend class RegionWriteLock;
|
||||||
mutable Glib::Threads::RWLock region_lock;
|
mutable Glib::Threads::RWLock region_lock;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setup_layering_indices (RegionList const &);
|
void setup_layering_indices (RegionList const &);
|
||||||
void coalesce_and_check_crossfades (std::list<Evoral::Range<samplepos_t> >);
|
void coalesce_and_check_crossfades (std::list<Evoral::Range<samplepos_t> >);
|
||||||
boost::shared_ptr<RegionList> find_regions_at (samplepos_t);
|
boost::shared_ptr<RegionList> find_regions_at (samplepos_t);
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,6 @@ struct ShowMeTheList {
|
||||||
string name;
|
string name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::make_property_quarks ()
|
Playlist::make_property_quarks ()
|
||||||
{
|
{
|
||||||
|
|
@ -102,8 +100,8 @@ RegionListProperty::create () const
|
||||||
void
|
void
|
||||||
RegionListProperty::get_content_as_xml (boost::shared_ptr<Region> region, XMLNode & node) const
|
RegionListProperty::get_content_as_xml (boost::shared_ptr<Region> region, XMLNode & node) const
|
||||||
{
|
{
|
||||||
/* All regions (even those which are deleted) have their state saved by other
|
/* All regions (even those which are deleted) have their state
|
||||||
code, so we can just store ID here.
|
* saved by other code, so we can just store ID here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
node.set_property ("id", region->id());
|
node.set_property ("id", region->id());
|
||||||
|
|
@ -349,10 +347,9 @@ Playlist::~Playlist ()
|
||||||
void
|
void
|
||||||
Playlist::_set_sort_id ()
|
Playlist::_set_sort_id ()
|
||||||
{
|
{
|
||||||
/*
|
/* Playlists are given names like <track name>.<id>
|
||||||
Playlists are given names like <track name>.<id>
|
* or <track name>.<edit group name>.<id> where id
|
||||||
or <track name>.<edit group name>.<id> where id
|
* is an integer. We extract the id and sort by that.
|
||||||
is an integer. We extract the id and sort by that.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
size_t dot_position = _name.val().find_last_of(".");
|
size_t dot_position = _name.val().find_last_of(".");
|
||||||
|
|
@ -372,9 +369,9 @@ bool
|
||||||
Playlist::set_name (const string& str)
|
Playlist::set_name (const string& str)
|
||||||
{
|
{
|
||||||
/* in a typical situation, a playlist is being used
|
/* in a typical situation, a playlist is being used
|
||||||
by one diskstream and also is referenced by the
|
* by one diskstream and also is referenced by the
|
||||||
Session. if there are more references than that,
|
* Session. if there are more references than that,
|
||||||
then don't change the name.
|
* then don't change the name.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (_refcnt > 2) {
|
if (_refcnt > 2) {
|
||||||
|
|
@ -389,11 +386,11 @@ Playlist::set_name (const string& str)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
CHANGE NOTIFICATION HANDLING
|
* CHANGE NOTIFICATION HANDLING
|
||||||
|
*
|
||||||
Notifications must be delayed till the region_lock is released. This
|
* Notifications must be delayed till the region_lock is released. This
|
||||||
is necessary because handlers for the signals may need to acquire
|
* is necessary because handlers for the signals may need to acquire
|
||||||
the lock (e.g. to read from the playlist).
|
* the lock (e.g. to read from the playlist).
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -546,7 +543,7 @@ void
|
||||||
Playlist::notify_region_added (boost::shared_ptr<Region> r)
|
Playlist::notify_region_added (boost::shared_ptr<Region> r)
|
||||||
{
|
{
|
||||||
/* the length change might not be true, but we have to act
|
/* the length change might not be true, but we have to act
|
||||||
as though it could be.
|
* as though it could be.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (holding_state()) {
|
if (holding_state()) {
|
||||||
|
|
@ -583,9 +580,9 @@ Playlist::flush_notifications (bool from_undo)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* we have no idea what order the regions ended up in pending
|
/* we have no idea what order the regions ended up in pending
|
||||||
bounds (it could be based on selection order, for example).
|
* bounds (it could be based on selection order, for example).
|
||||||
so, to preserve layering in the "most recently moved is higher"
|
* so, to preserve layering in the "most recently moved is higher"
|
||||||
model, sort them by existing layer, then timestamp them.
|
* model, sort them by existing layer, then timestamp them.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// RegionSortByLayer cmp;
|
// RegionSortByLayer cmp;
|
||||||
|
|
@ -661,8 +658,8 @@ Playlist::clear_pending ()
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
PLAYLIST OPERATIONS
|
* PLAYLIST OPERATIONS
|
||||||
*************************************************************/
|
*************************************************************/
|
||||||
|
|
||||||
/** Note: this calls set_layer (..., DBL_MAX) so it will reset the layering index of region */
|
/** Note: this calls set_layer (..., DBL_MAX) so it will reset the layering index of region */
|
||||||
void
|
void
|
||||||
|
|
@ -692,7 +689,7 @@ Playlist::add_region (boost::shared_ptr<Region> region, samplepos_t position, fl
|
||||||
}
|
}
|
||||||
|
|
||||||
/* note that itimes can be zero if we being asked to just
|
/* note that itimes can be zero if we being asked to just
|
||||||
insert a single fraction of the region.
|
* insert a single fraction of the region.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (int i = 0; i < itimes; ++i) {
|
for (int i = 0; i < itimes; ++i) {
|
||||||
|
|
@ -918,7 +915,6 @@ static void maybe_add_start_beats (TempoMap const& tm, PropertyList& plist, boos
|
||||||
* start and end if cutting == true. Regions that lie entirely within start and end are always
|
* start and end if cutting == true. Regions that lie entirely within start and end are always
|
||||||
* removed.
|
* removed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::partition_internal (samplepos_t start, samplepos_t end, bool cutting, RegionList& thawlist)
|
Playlist::partition_internal (samplepos_t start, samplepos_t end, bool cutting, RegionList& thawlist)
|
||||||
{
|
{
|
||||||
|
|
@ -935,8 +931,8 @@ Playlist::partition_internal (samplepos_t start, samplepos_t end, bool cutting,
|
||||||
|
|
||||||
in_partition = true;
|
in_partition = true;
|
||||||
|
|
||||||
/* need to work from a copy, because otherwise the regions we add during the process
|
/* need to work from a copy, because otherwise the regions we add
|
||||||
get operated on as well.
|
* during the process get operated on as well.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RegionList copy = regions.rlist();
|
RegionList copy = regions.rlist();
|
||||||
|
|
@ -958,8 +954,8 @@ Playlist::partition_internal (samplepos_t start, samplepos_t end, bool cutting,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* coverage will return OverlapStart if the start coincides
|
/* coverage will return OverlapStart if the start coincides
|
||||||
with the end point. we do not partition such a region,
|
* with the end point. we do not partition such a region,
|
||||||
so catch this special case.
|
* so catch this special case.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (current->first_sample() >= end) {
|
if (current->first_sample() >= end) {
|
||||||
|
|
@ -977,18 +973,16 @@ Playlist::partition_internal (samplepos_t start, samplepos_t end, bool cutting,
|
||||||
|
|
||||||
if (overlap == Evoral::OverlapInternal) {
|
if (overlap == Evoral::OverlapInternal) {
|
||||||
/* split: we need 3 new regions, the front, middle and end.
|
/* split: we need 3 new regions, the front, middle and end.
|
||||||
cut: we need 2 regions, the front and end.
|
* cut: we need 2 regions, the front and end.
|
||||||
*/
|
*
|
||||||
|
*
|
||||||
/*
|
* start end
|
||||||
start end
|
* ---------------*************************------------
|
||||||
---------------*************************------------
|
* P1 P2 P3 P4
|
||||||
P1 P2 P3 P4
|
* SPLIT:
|
||||||
SPLIT:
|
* ---------------*****++++++++++++++++====------------
|
||||||
---------------*****++++++++++++++++====------------
|
* CUT
|
||||||
CUT
|
* ---------------*****----------------====------------
|
||||||
---------------*****----------------====------------
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!cutting) {
|
if (!cutting) {
|
||||||
|
|
@ -1088,19 +1082,17 @@ Playlist::partition_internal (samplepos_t start, samplepos_t end, bool cutting,
|
||||||
} else if (overlap == Evoral::OverlapStart) {
|
} else if (overlap == Evoral::OverlapStart) {
|
||||||
|
|
||||||
/* split: we need 2 regions: the front and the end.
|
/* split: we need 2 regions: the front and the end.
|
||||||
cut: just trim current to skip the cut area
|
* cut: just trim current to skip the cut area
|
||||||
*/
|
*
|
||||||
|
*
|
||||||
/*
|
* start end
|
||||||
start end
|
* ---------------*************************------------
|
||||||
---------------*************************------------
|
* P2 P1 P3 P4
|
||||||
P2 P1 P3 P4
|
*
|
||||||
|
* SPLIT:
|
||||||
SPLIT:
|
* ---------------****+++++++++++++++++++++------------
|
||||||
---------------****+++++++++++++++++++++------------
|
* CUT:
|
||||||
CUT:
|
* -------------------*********************------------
|
||||||
-------------------*********************------------
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!cutting) {
|
if (!cutting) {
|
||||||
|
|
@ -1133,19 +1125,19 @@ Playlist::partition_internal (samplepos_t start, samplepos_t end, bool cutting,
|
||||||
} else if (overlap == Evoral::OverlapExternal) {
|
} else if (overlap == Evoral::OverlapExternal) {
|
||||||
|
|
||||||
/* split: no split required.
|
/* split: no split required.
|
||||||
cut: remove the region.
|
* cut: remove the region.
|
||||||
*/
|
*
|
||||||
|
*
|
||||||
/*
|
* start end
|
||||||
start end
|
* ---------------*************************------------
|
||||||
---------------*************************------------
|
* P2 P1 P3 P4
|
||||||
P2 P1 P3 P4
|
*
|
||||||
|
*
|
||||||
SPLIT:
|
* SPLIT:
|
||||||
---------------*************************------------
|
* ---------------*************************------------
|
||||||
CUT:
|
* CUT:
|
||||||
----------------------------------------------------
|
* ----------------------------------------------------
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (cutting) {
|
if (cutting) {
|
||||||
|
|
@ -1186,8 +1178,8 @@ Playlist::cut_copy (boost::shared_ptr<Playlist> (Playlist::*pmf)(samplepos_t, sa
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* paste the next section into the nascent playlist,
|
/* paste the next section into the nascent playlist,
|
||||||
offset to reflect the start of the first range we
|
* offset to reflect the start of the first range we
|
||||||
chopped.
|
* chopped.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ret->paste (pl, (*i).start - start, 1.0f, 0);
|
ret->paste (pl, (*i).start - start, 1.0f, 0);
|
||||||
|
|
@ -1401,9 +1393,9 @@ Playlist::duplicate_ranges (std::list<AudioRange>& ranges, float times)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::shift (samplepos_t at, sampleoffset_t distance, bool move_intersected, bool ignore_music_glue)
|
Playlist::shift (samplepos_t at, sampleoffset_t distance, bool move_intersected, bool ignore_music_glue)
|
||||||
{
|
{
|
||||||
RegionWriteLock rlock (this);
|
RegionWriteLock rlock (this);
|
||||||
RegionList copy (regions.rlist());
|
RegionList copy (regions.rlist());
|
||||||
RegionList fixup;
|
RegionList fixup;
|
||||||
|
|
@ -1423,7 +1415,7 @@ Playlist::duplicate_ranges (std::list<AudioRange>& ranges, float times)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do not move regions glued to music time - that
|
/* do not move regions glued to music time - that
|
||||||
has to be done separately.
|
* has to be done separately.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!ignore_music_glue && (*r)->position_lock_style() != AudioTime) {
|
if (!ignore_music_glue && (*r)->position_lock_style() != AudioTime) {
|
||||||
|
|
@ -1438,32 +1430,31 @@ Playlist::duplicate_ranges (std::list<AudioRange>& ranges, float times)
|
||||||
for (RegionList::iterator r = fixup.begin(); r != fixup.end(); ++r) {
|
for (RegionList::iterator r = fixup.begin(); r != fixup.end(); ++r) {
|
||||||
(*r)->recompute_position_from_lock_style (0);
|
(*r)->recompute_position_from_lock_style (0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::split (const MusicSample& at)
|
Playlist::split (const MusicSample& at)
|
||||||
{
|
{
|
||||||
RegionWriteLock rlock (this);
|
RegionWriteLock rlock (this);
|
||||||
RegionList copy (regions.rlist());
|
RegionList copy (regions.rlist());
|
||||||
|
|
||||||
/* use a copy since this operation can modify the region list
|
/* use a copy since this operation can modify the region list */
|
||||||
*/
|
|
||||||
|
|
||||||
for (RegionList::iterator r = copy.begin(); r != copy.end(); ++r) {
|
for (RegionList::iterator r = copy.begin(); r != copy.end(); ++r) {
|
||||||
_split_region (*r, at);
|
_split_region (*r, at);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::split_region (boost::shared_ptr<Region> region, const MusicSample& playlist_position)
|
Playlist::split_region (boost::shared_ptr<Region> region, const MusicSample& playlist_position)
|
||||||
{
|
{
|
||||||
RegionWriteLock rl (this);
|
RegionWriteLock rl (this);
|
||||||
_split_region (region, playlist_position);
|
_split_region (region, playlist_position);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::_split_region (boost::shared_ptr<Region> region, const MusicSample& playlist_position)
|
Playlist::_split_region (boost::shared_ptr<Region> region, const MusicSample& playlist_position)
|
||||||
{
|
{
|
||||||
if (!region->covers (playlist_position.sample)) {
|
if (!region->covers (playlist_position.sample)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1498,8 +1489,8 @@ Playlist::duplicate_ranges (std::list<AudioRange>& ranges, float times)
|
||||||
plist.add (Properties::layer, region->layer ());
|
plist.add (Properties::layer, region->layer ());
|
||||||
|
|
||||||
/* note: we must use the version of ::create with an offset here,
|
/* note: we must use the version of ::create with an offset here,
|
||||||
since it supplies that offset to the Region constructor, which
|
* since it supplies that offset to the Region constructor, which
|
||||||
is necessary to get audio region gain envelopes right.
|
* is necessary to get audio region gain envelopes right.
|
||||||
*/
|
*/
|
||||||
left = RegionFactory::create (region, MusicSample (0, 0), plist, true);
|
left = RegionFactory::create (region, MusicSample (0, 0), plist, true);
|
||||||
}
|
}
|
||||||
|
|
@ -1525,7 +1516,7 @@ Playlist::duplicate_ranges (std::list<AudioRange>& ranges, float times)
|
||||||
remove_region_internal (region);
|
remove_region_internal (region);
|
||||||
|
|
||||||
_splicing = old_sp;
|
_splicing = old_sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::AddToSoloSelectedList(const Region* r)
|
Playlist::AddToSoloSelectedList(const Region* r)
|
||||||
|
|
@ -1556,9 +1547,9 @@ Playlist::SoloSelectedActive()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::possibly_splice (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> exclude)
|
Playlist::possibly_splice (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> exclude)
|
||||||
{
|
{
|
||||||
if (_splicing || in_set_state) {
|
if (_splicing || in_set_state) {
|
||||||
/* don't respond to splicing moves or state setting */
|
/* don't respond to splicing moves or state setting */
|
||||||
return;
|
return;
|
||||||
|
|
@ -1567,11 +1558,11 @@ Playlist::SoloSelectedActive()
|
||||||
if (_edit_mode == Splice) {
|
if (_edit_mode == Splice) {
|
||||||
splice_locked (at, distance, exclude);
|
splice_locked (at, distance, exclude);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::possibly_splice_unlocked (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> exclude)
|
Playlist::possibly_splice_unlocked (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> exclude)
|
||||||
{
|
{
|
||||||
if (_splicing || in_set_state) {
|
if (_splicing || in_set_state) {
|
||||||
/* don't respond to splicing moves or state setting */
|
/* don't respond to splicing moves or state setting */
|
||||||
return;
|
return;
|
||||||
|
|
@ -1580,26 +1571,26 @@ Playlist::SoloSelectedActive()
|
||||||
if (_edit_mode == Splice) {
|
if (_edit_mode == Splice) {
|
||||||
splice_unlocked (at, distance, exclude);
|
splice_unlocked (at, distance, exclude);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::splice_locked (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> exclude)
|
Playlist::splice_locked (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> exclude)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
RegionWriteLock rl (this);
|
RegionWriteLock rl (this);
|
||||||
core_splice (at, distance, exclude);
|
core_splice (at, distance, exclude);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::splice_unlocked (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> exclude)
|
Playlist::splice_unlocked (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> exclude)
|
||||||
{
|
{
|
||||||
core_splice (at, distance, exclude);
|
core_splice (at, distance, exclude);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::core_splice (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> exclude)
|
Playlist::core_splice (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> exclude)
|
||||||
{
|
{
|
||||||
_splicing = true;
|
_splicing = true;
|
||||||
|
|
||||||
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
|
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
|
||||||
|
|
@ -1686,7 +1677,7 @@ Playlist::region_bounds_changed (const PropertyChange& what_changed, boost::shar
|
||||||
if (what_changed.contains (Properties::position)) {
|
if (what_changed.contains (Properties::position)) {
|
||||||
|
|
||||||
/* remove it from the list then add it back in
|
/* remove it from the list then add it back in
|
||||||
the right place again.
|
* the right place again.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RegionSortByPosition cmp;
|
RegionSortByPosition cmp;
|
||||||
|
|
@ -1695,8 +1686,8 @@ Playlist::region_bounds_changed (const PropertyChange& what_changed, boost::shar
|
||||||
|
|
||||||
if (i == regions.end()) {
|
if (i == regions.end()) {
|
||||||
/* the region bounds are being modified but its not currently
|
/* the region bounds are being modified but its not currently
|
||||||
in the region list. we will use its bounds correctly when/if
|
* in the region list. we will use its bounds correctly when/if
|
||||||
it is added
|
* it is added
|
||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1732,11 +1723,11 @@ Playlist::region_bounds_changed (const PropertyChange& what_changed, boost::shar
|
||||||
coalesce_and_check_crossfades (xf);
|
coalesce_and_check_crossfades (xf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::region_changed_proxy (const PropertyChange& what_changed, boost::weak_ptr<Region> weak_region)
|
Playlist::region_changed_proxy (const PropertyChange& what_changed, boost::weak_ptr<Region> weak_region)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Region> region (weak_region.lock());
|
boost::shared_ptr<Region> region (weak_region.lock());
|
||||||
|
|
||||||
if (!region) {
|
if (!region) {
|
||||||
|
|
@ -1746,11 +1737,11 @@ Playlist::region_bounds_changed (const PropertyChange& what_changed, boost::shar
|
||||||
/* this makes a virtual call to the right kind of playlist ... */
|
/* this makes a virtual call to the right kind of playlist ... */
|
||||||
|
|
||||||
region_changed (what_changed, region);
|
region_changed (what_changed, region);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Playlist::region_changed (const PropertyChange& what_changed, boost::shared_ptr<Region> region)
|
Playlist::region_changed (const PropertyChange& what_changed, boost::shared_ptr<Region> region)
|
||||||
{
|
{
|
||||||
PropertyChange our_interests;
|
PropertyChange our_interests;
|
||||||
PropertyChange bounds;
|
PropertyChange bounds;
|
||||||
PropertyChange pos_and_length;
|
PropertyChange pos_and_length;
|
||||||
|
|
@ -1785,7 +1776,7 @@ Playlist::region_bounds_changed (const PropertyChange& what_changed, boost::shar
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't notify about layer changes, since we are the only object that can initiate
|
/* don't notify about layer changes, since we are the only object that can initiate
|
||||||
them, and we notify in ::relayer()
|
* them, and we notify in ::relayer()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (what_changed.contains (our_interests)) {
|
if (what_changed.contains (our_interests)) {
|
||||||
|
|
@ -1795,19 +1786,19 @@ Playlist::region_bounds_changed (const PropertyChange& what_changed, boost::shar
|
||||||
mark_session_dirty ();
|
mark_session_dirty ();
|
||||||
|
|
||||||
return save;
|
return save;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::drop_regions ()
|
Playlist::drop_regions ()
|
||||||
{
|
{
|
||||||
RegionWriteLock rl (this);
|
RegionWriteLock rl (this);
|
||||||
regions.clear ();
|
regions.clear ();
|
||||||
all_regions.clear ();
|
all_regions.clear ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::sync_all_regions_with_regions ()
|
Playlist::sync_all_regions_with_regions ()
|
||||||
{
|
{
|
||||||
RegionWriteLock rl (this);
|
RegionWriteLock rl (this);
|
||||||
|
|
||||||
all_regions.clear ();
|
all_regions.clear ();
|
||||||
|
|
@ -1815,11 +1806,11 @@ Playlist::region_bounds_changed (const PropertyChange& what_changed, boost::shar
|
||||||
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
|
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
|
||||||
all_regions.insert (*i);
|
all_regions.insert (*i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::clear (bool with_signals)
|
Playlist::clear (bool with_signals)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
RegionWriteLock rl (this);
|
RegionWriteLock rl (this);
|
||||||
|
|
||||||
|
|
@ -1848,11 +1839,11 @@ Playlist::region_bounds_changed (const PropertyChange& what_changed, boost::shar
|
||||||
ContentsChanged ();
|
ContentsChanged ();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *********************************************************************
|
/* *********************************************************************
|
||||||
FINDING THINGS
|
FINDING THINGS
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
boost::shared_ptr<RegionList>
|
boost::shared_ptr<RegionList>
|
||||||
Playlist::region_list()
|
Playlist::region_list()
|
||||||
|
|
@ -1879,9 +1870,9 @@ Playlist::regions_at (samplepos_t sample)
|
||||||
return find_regions_at (sample);
|
return find_regions_at (sample);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
Playlist::count_regions_at (samplepos_t sample) const
|
Playlist::count_regions_at (samplepos_t sample) const
|
||||||
{
|
{
|
||||||
RegionReadLock rlock (const_cast<Playlist*>(this));
|
RegionReadLock rlock (const_cast<Playlist*>(this));
|
||||||
uint32_t cnt = 0;
|
uint32_t cnt = 0;
|
||||||
|
|
||||||
|
|
@ -1892,12 +1883,11 @@ Playlist::regions_at (samplepos_t sample)
|
||||||
}
|
}
|
||||||
|
|
||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<Region>
|
boost::shared_ptr<Region>
|
||||||
Playlist::top_region_at (samplepos_t sample)
|
Playlist::top_region_at (samplepos_t sample)
|
||||||
|
{
|
||||||
{
|
|
||||||
RegionReadLock rlock (this);
|
RegionReadLock rlock (this);
|
||||||
boost::shared_ptr<RegionList> rlist = find_regions_at (sample);
|
boost::shared_ptr<RegionList> rlist = find_regions_at (sample);
|
||||||
boost::shared_ptr<Region> region;
|
boost::shared_ptr<Region> region;
|
||||||
|
|
@ -1909,12 +1899,11 @@ Playlist::regions_at (samplepos_t sample)
|
||||||
}
|
}
|
||||||
|
|
||||||
return region;
|
return region;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<Region>
|
boost::shared_ptr<Region>
|
||||||
Playlist::top_unmuted_region_at (samplepos_t sample)
|
Playlist::top_unmuted_region_at (samplepos_t sample)
|
||||||
|
{
|
||||||
{
|
|
||||||
RegionReadLock rlock (this);
|
RegionReadLock rlock (this);
|
||||||
boost::shared_ptr<RegionList> rlist = find_regions_at (sample);
|
boost::shared_ptr<RegionList> rlist = find_regions_at (sample);
|
||||||
|
|
||||||
|
|
@ -1940,7 +1929,7 @@ Playlist::regions_at (samplepos_t sample)
|
||||||
}
|
}
|
||||||
|
|
||||||
return region;
|
return region;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<RegionList>
|
boost::shared_ptr<RegionList>
|
||||||
Playlist::find_regions_at (samplepos_t sample)
|
Playlist::find_regions_at (samplepos_t sample)
|
||||||
|
|
@ -2133,9 +2122,9 @@ Playlist::find_next_region (samplepos_t sample, RegionPoint point, int dir)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
samplepos_t
|
samplepos_t
|
||||||
Playlist::find_next_region_boundary (samplepos_t sample, int dir)
|
Playlist::find_next_region_boundary (samplepos_t sample, int dir)
|
||||||
{
|
{
|
||||||
RegionReadLock rlock (this);
|
RegionReadLock rlock (this);
|
||||||
|
|
||||||
samplepos_t closest = max_samplepos;
|
samplepos_t closest = max_samplepos;
|
||||||
|
|
@ -2203,39 +2192,35 @@ Playlist::find_next_region (samplepos_t sample, RegionPoint point, int dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************/
|
||||||
|
|
||||||
/***********************************************************************/
|
void
|
||||||
|
Playlist::mark_session_dirty ()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
Playlist::mark_session_dirty ()
|
|
||||||
{
|
|
||||||
if (!in_set_state && !holding_state ()) {
|
if (!in_set_state && !holding_state ()) {
|
||||||
_session.set_dirty();
|
_session.set_dirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::rdiff (vector<Command*>& cmds) const
|
Playlist::rdiff (vector<Command*>& cmds) const
|
||||||
{
|
{
|
||||||
RegionReadLock rlock (const_cast<Playlist *> (this));
|
RegionReadLock rlock (const_cast<Playlist *> (this));
|
||||||
Stateful::rdiff (cmds);
|
Stateful::rdiff (cmds);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::clear_owned_changes ()
|
Playlist::clear_owned_changes ()
|
||||||
{
|
{
|
||||||
RegionReadLock rlock (this);
|
RegionReadLock rlock (this);
|
||||||
Stateful::clear_owned_changes ();
|
Stateful::clear_owned_changes ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::update (const RegionListProperty::ChangeRecord& change)
|
Playlist::update (const RegionListProperty::ChangeRecord& change)
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("Playlist %1 updates from a change record with %2 adds %3 removes\n",
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("Playlist %1 updates from a change record with %2 adds %3 removes\n",
|
||||||
name(), change.added.size(), change.removed.size()));
|
name(), change.added.size(), change.removed.size()));
|
||||||
|
|
||||||
|
|
@ -2250,11 +2235,11 @@ Playlist::find_next_region (samplepos_t sample, RegionPoint point, int dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
thaw ();
|
thaw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Playlist::set_state (const XMLNode& node, int version)
|
Playlist::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNode *child;
|
XMLNode *child;
|
||||||
XMLNodeList nlist;
|
XMLNodeList nlist;
|
||||||
XMLNodeConstIterator niter;
|
XMLNodeConstIterator niter;
|
||||||
|
|
@ -2514,7 +2499,6 @@ struct RelayerSort {
|
||||||
* regions in the playlist to put the specified region in the appropriate
|
* regions in the playlist to put the specified region in the appropriate
|
||||||
* place. The actual layering will be fixed up when relayer() happens.
|
* place. The actual layering will be fixed up when relayer() happens.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
Playlist::set_layer (boost::shared_ptr<Region> region, double new_layer)
|
Playlist::set_layer (boost::shared_ptr<Region> region, double new_layer)
|
||||||
{
|
{
|
||||||
|
|
@ -2569,9 +2553,9 @@ Playlist::relayer ()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build up a new list of regions on each layer, stored in a set of lists
|
/* Build up a new list of regions on each layer, stored in a set of lists
|
||||||
each of which represent some period of time on some layer. The idea
|
* each of which represent some period of time on some layer. The idea
|
||||||
is to avoid having to search the entire region list to establish whether
|
* is to avoid having to search the entire region list to establish whether
|
||||||
each region overlaps another */
|
* each region overlaps another */
|
||||||
|
|
||||||
/* how many pieces to divide this playlist's time up into */
|
/* how many pieces to divide this playlist's time up into */
|
||||||
int const divisions = 512;
|
int const divisions = 512;
|
||||||
|
|
@ -2609,8 +2593,8 @@ Playlist::relayer ()
|
||||||
for (RegionList::iterator i = copy.begin(); i != copy.end(); ++i) {
|
for (RegionList::iterator i = copy.begin(); i != copy.end(); ++i) {
|
||||||
|
|
||||||
/* find the time divisions that this region covers; if there are no regions on the list,
|
/* find the time divisions that this region covers; if there are no regions on the list,
|
||||||
division_size will equal 0 and in this case we'll just say that
|
* division_size will equal 0 and in this case we'll just say that
|
||||||
start_division = end_division = 0.
|
* start_division = end_division = 0.
|
||||||
*/
|
*/
|
||||||
int start_division = 0;
|
int start_division = 0;
|
||||||
int end_division = 0;
|
int end_division = 0;
|
||||||
|
|
@ -2629,7 +2613,7 @@ Playlist::relayer ()
|
||||||
size_t j = layers.size();
|
size_t j = layers.size();
|
||||||
while (j > 0) {
|
while (j > 0) {
|
||||||
/* try layer j - 1; it can go on if it overlaps no other region
|
/* try layer j - 1; it can go on if it overlaps no other region
|
||||||
that is already on that layer
|
* that is already on that layer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool overlap = false;
|
bool overlap = false;
|
||||||
|
|
@ -2670,16 +2654,16 @@ Playlist::relayer ()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* It's a little tricky to know when we could avoid calling this; e.g. if we are
|
/* It's a little tricky to know when we could avoid calling this; e.g. if we are
|
||||||
relayering because we just removed the only region on the top layer, nothing will
|
* relayering because we just removed the only region on the top layer, nothing will
|
||||||
appear to have changed, but the StreamView must still sort itself out. We could
|
* appear to have changed, but the StreamView must still sort itself out. We could
|
||||||
probably keep a note of the top layer last time we relayered, and check that,
|
* probably keep a note of the top layer last time we relayered, and check that,
|
||||||
but premature optimisation &c...
|
* but premature optimisation &c...
|
||||||
*/
|
*/
|
||||||
notify_layering_changed ();
|
notify_layering_changed ();
|
||||||
|
|
||||||
/* This relayer() may have been called as a result of a region removal, in which
|
/* This relayer() may have been called as a result of a region removal, in which
|
||||||
case we need to setup layering indices to account for the one that has just
|
* case we need to setup layering indices to account for the one that has just
|
||||||
gone away.
|
* gone away.
|
||||||
*/
|
*/
|
||||||
setup_layering_indices (copy);
|
setup_layering_indices (copy);
|
||||||
}
|
}
|
||||||
|
|
@ -2766,10 +2750,10 @@ Playlist::uses_source (boost::shared_ptr<const Source> src, bool shallow) const
|
||||||
|
|
||||||
for (set<boost::shared_ptr<Region> >::const_iterator r = all_regions.begin(); r != all_regions.end(); ++r) {
|
for (set<boost::shared_ptr<Region> >::const_iterator r = all_regions.begin(); r != all_regions.end(); ++r) {
|
||||||
/* Note: passing the second argument as false can cause at best
|
/* Note: passing the second argument as false can cause at best
|
||||||
incredibly deep and time-consuming recursion, and at worst
|
* incredibly deep and time-consuming recursion, and at worst
|
||||||
cycles if the user has managed to create cycles of reference
|
* cycles if the user has managed to create cycles of reference
|
||||||
between compound regions. We generally only this during
|
* between compound regions. We generally only this during
|
||||||
cleanup, and @param shallow is passed as true.
|
* cleanup, and @param shallow is passed as true.
|
||||||
*/
|
*/
|
||||||
if ((*r)->uses_source (src, shallow)) {
|
if ((*r)->uses_source (src, shallow)) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2908,14 +2892,14 @@ Playlist::shuffle (boost::shared_ptr<Region> region, int dir)
|
||||||
|
|
||||||
if ((*next)->position() != region->last_sample() + 1) {
|
if ((*next)->position() != region->last_sample() + 1) {
|
||||||
/* they didn't used to touch, so after shuffle,
|
/* they didn't used to touch, so after shuffle,
|
||||||
just have them swap positions.
|
* just have them swap positions.
|
||||||
*/
|
*/
|
||||||
new_pos = (*next)->position();
|
new_pos = (*next)->position();
|
||||||
} else {
|
} else {
|
||||||
/* they used to touch, so after shuffle,
|
/* they used to touch, so after shuffle,
|
||||||
make sure they still do. put the earlier
|
* make sure they still do. put the earlier
|
||||||
region where the later one will end after
|
* region where the later one will end after
|
||||||
it is moved.
|
* it is moved.
|
||||||
*/
|
*/
|
||||||
new_pos = region->position() + (*next)->length();
|
new_pos = region->position() + (*next)->length();
|
||||||
}
|
}
|
||||||
|
|
@ -2950,13 +2934,13 @@ Playlist::shuffle (boost::shared_ptr<Region> region, int dir)
|
||||||
samplepos_t new_pos;
|
samplepos_t new_pos;
|
||||||
if (region->position() != (*prev)->last_sample() + 1) {
|
if (region->position() != (*prev)->last_sample() + 1) {
|
||||||
/* they didn't used to touch, so after shuffle,
|
/* they didn't used to touch, so after shuffle,
|
||||||
just have them swap positions.
|
* just have them swap positions.
|
||||||
*/
|
*/
|
||||||
new_pos = region->position();
|
new_pos = region->position();
|
||||||
} else {
|
} else {
|
||||||
/* they used to touch, so after shuffle,
|
/* they used to touch, so after shuffle,
|
||||||
make sure they still do. put the earlier
|
* make sure they still do. put the earlier
|
||||||
one where the later one will end after
|
* one where the later one will end after
|
||||||
*/
|
*/
|
||||||
new_pos = (*prev)->position() + region->length();
|
new_pos = (*prev)->position() + region->length();
|
||||||
}
|
}
|
||||||
|
|
@ -3159,9 +3143,7 @@ Playlist::combine (const RegionList& r)
|
||||||
|
|
||||||
boost::shared_ptr<Region> parent_region = RegionFactory::create (sources, plist, true);
|
boost::shared_ptr<Region> parent_region = RegionFactory::create (sources, plist, true);
|
||||||
|
|
||||||
/* now the non-whole-file region that we will actually use in the
|
/* now the non-whole-file region that we will actually use in the playlist */
|
||||||
* playlist
|
|
||||||
*/
|
|
||||||
|
|
||||||
plist.clear ();
|
plist.clear ();
|
||||||
plist.add (Properties::start, 0);
|
plist.add (Properties::start, 0);
|
||||||
|
|
@ -3171,8 +3153,7 @@ Playlist::combine (const RegionList& r)
|
||||||
|
|
||||||
boost::shared_ptr<Region> compound_region = RegionFactory::create (parent_region, plist, true);
|
boost::shared_ptr<Region> compound_region = RegionFactory::create (parent_region, plist, true);
|
||||||
|
|
||||||
/* remove all the selected regions from the current playlist
|
/* remove all the selected regions from the current playlist */
|
||||||
*/
|
|
||||||
|
|
||||||
freeze ();
|
freeze ();
|
||||||
|
|
||||||
|
|
@ -3180,9 +3161,7 @@ Playlist::combine (const RegionList& r)
|
||||||
remove_region (*i);
|
remove_region (*i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do type-specific stuff with the originals and the new compound
|
/* do type-specific stuff with the originals and the new compound region */
|
||||||
region
|
|
||||||
*/
|
|
||||||
|
|
||||||
post_combine (originals, compound_region);
|
post_combine (originals, compound_region);
|
||||||
|
|
||||||
|
|
@ -3217,12 +3196,12 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
|
||||||
samplepos_t adjusted_end = 0; // gcc isn't smart enough
|
samplepos_t adjusted_end = 0; // gcc isn't smart enough
|
||||||
|
|
||||||
/* the leftmost (earliest) edge of the compound region
|
/* the leftmost (earliest) edge of the compound region
|
||||||
starts at zero in its source, or larger if it
|
* starts at zero in its source, or larger if it
|
||||||
has been trimmed or content-scrolled.
|
* has been trimmed or content-scrolled.
|
||||||
|
*
|
||||||
the rightmost (latest) edge of the compound region
|
* the rightmost (latest) edge of the compound region
|
||||||
relative to its source is the starting point plus
|
* relative to its source is the starting point plus
|
||||||
the length of the region.
|
* the length of the region.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// (2) get all the original regions
|
// (2) get all the original regions
|
||||||
|
|
@ -3267,9 +3246,7 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
|
||||||
samplepos_t pos = original->position();
|
samplepos_t pos = original->position();
|
||||||
/* make a copy, but don't announce it */
|
/* make a copy, but don't announce it */
|
||||||
original = RegionFactory::create (original, false);
|
original = RegionFactory::create (original, false);
|
||||||
/* the pure copy constructor resets position() to zero,
|
/* the pure copy constructor resets position() to zero, so fix that up. */
|
||||||
so fix that up.
|
|
||||||
*/
|
|
||||||
original->set_position (pos);
|
original->set_position (pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3284,7 +3261,7 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
|
||||||
switch (original->coverage (adjusted_start, adjusted_end)) {
|
switch (original->coverage (adjusted_start, adjusted_end)) {
|
||||||
case Evoral::OverlapNone:
|
case Evoral::OverlapNone:
|
||||||
/* original region does not cover any part
|
/* original region does not cover any part
|
||||||
of the current state of the compound region
|
* of the current state of the compound region
|
||||||
*/
|
*/
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
@ -3297,15 +3274,11 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Evoral::OverlapExternal:
|
case Evoral::OverlapExternal:
|
||||||
/* overlap fully covers original, so leave it
|
/* overlap fully covers original, so leave it as is */
|
||||||
as is
|
|
||||||
*/
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Evoral::OverlapEnd:
|
case Evoral::OverlapEnd:
|
||||||
/* overlap starts within but covers end,
|
/* overlap starts within but covers end, so trim the front of the region */
|
||||||
so trim the front of the region
|
|
||||||
*/
|
|
||||||
original->trim_front (adjusted_start);
|
original->trim_front (adjusted_start);
|
||||||
modified_region = true;
|
modified_region = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -3320,8 +3293,7 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (move_offset) {
|
if (move_offset) {
|
||||||
/* fix the position to match any movement of the compound region.
|
/* fix the position to match any movement of the compound region. */
|
||||||
*/
|
|
||||||
original->set_position (original->position() + move_offset);
|
original->set_position (original->position() + move_offset);
|
||||||
modified_region = true;
|
modified_region = true;
|
||||||
}
|
}
|
||||||
|
|
@ -3451,7 +3423,7 @@ void
|
||||||
Playlist::coalesce_and_check_crossfades (list<Evoral::Range<samplepos_t> > ranges)
|
Playlist::coalesce_and_check_crossfades (list<Evoral::Range<samplepos_t> > ranges)
|
||||||
{
|
{
|
||||||
/* XXX: it's a shame that this coalesce algorithm also exists in
|
/* XXX: it's a shame that this coalesce algorithm also exists in
|
||||||
TimeSelection::consolidate().
|
* TimeSelection::consolidate().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* XXX: xfade: this is implemented in Evoral::RangeList */
|
/* XXX: xfade: this is implemented in Evoral::RangeList */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue