, _transient_user_start (0) \
, _transient_analysis_start (0) \
, _transient_analysis_end (0) \
+ , _soloSelected (false) \
, _muted (Properties::muted, false) \
, _opaque (Properties::opaque, true) \
, _locked (Properties::locked, false) \
, _transients (other->_transients) \
, _transient_analysis_start (other->_transient_analysis_start) \
, _transient_analysis_end (other->_transient_analysis_end) \
+ , _soloSelected (false) \
, _muted (Properties::muted, other->_muted) \
, _opaque (Properties::opaque, other->_opaque) \
, _locked (Properties::locked, other->_locked) \
return true;
}
+void
+Region::set_selected_for_solo(bool yn)
+{
+ if (_soloSelected != yn) {
+
+ boost::shared_ptr<Playlist> pl (playlist());
+ if (pl){
+ if (yn) {
+ pl->AddToSoloSelectedList(this);
+ } else {
+ pl->RemoveFromSoloSelectedList(this);
+ }
+ }
+
+ _soloSelected = yn;
+ }
+
+}
+
void
Region::set_length (samplecnt_t len, const int32_t sub_num)
{
}
bool
-Region::equivalent (boost::shared_ptr<const Region> other) const
+Region::enclosed_equivalent (boost::shared_ptr<const Region> other) const
+{
+ return (first_sample() >= other->first_sample() && last_sample() <= other->last_sample()) ||
+ (first_sample() <= other->first_sample() && last_sample() >= other->last_sample()) ;
+}
+
+bool
+Region::exact_equivalent (boost::shared_ptr<const Region> other) const
{
return _start == other->_start &&
_position == other->_position &&
if (!_user_transients.empty ()) {
++cnt;
}
- if (cnt > 1 ) {
+ if (cnt > 1) {
afl.sort ();
// remove exact duplicates
TransientDetector::cleanup_transients (afl, _session.sample_rate(), 0);