diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-30 19:30:38 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-30 19:30:38 +0000 |
commit | bfefff3588d06ac14db6cca04222628c42953064 (patch) | |
tree | 8c58ee128cffc2bbcfc7457507a078e3836cb38b /libs/ardour/audioregion.cc | |
parent | 71dd60c7365ef37e6ce516dce528fb2611fb80bc (diff) |
rethink how to load legacy crossfades as new-style xfades
git-svn-id: svn://localhost/ardour2/branches/3.0@12496 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audioregion.cc')
-rw-r--r-- | libs/ardour/audioregion.cc | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 66b978131d..248da95936 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -78,14 +78,14 @@ reverse_curve (boost::shared_ptr<Evoral::ControlList> dst, boost::shared_ptr<con size_t len = src->back()->when; for (Evoral::ControlList::const_iterator it = src->begin(); it!=src->end(); it++) { - dst->add ( len - (*it)->when, (*it)->value ); + dst->add (len - (*it)->when, (*it)->value); } } static void generate_inverse_power_curve (boost::shared_ptr<Evoral::ControlList> dst, boost::shared_ptr<const Evoral::ControlList> src) { - //calc inverse curve using sum of squares + // calc inverse curve using sum of squares for (Evoral::ControlList::const_iterator it = src->begin(); it!=src->end(); ++it ) { float value = (*it)->value; value = 1 - powf(value,2); @@ -94,18 +94,6 @@ generate_inverse_power_curve (boost::shared_ptr<Evoral::ControlList> dst, boost: } } -/* -static void -generate_inverse_coefficient_curve (boost::shared_ptr<Evoral::ControlList> dst, boost::shared_ptr<const Evoral::ControlList> src) -{ - //calc inverse gain coefficient curve - for (Evoral::ControlList::const_iterator it = src->begin(); it!=src->end(); ++it ) { - float value = 1.0 - (*it)->value; - dst->fast_simple_add ( (*it)->when, value ); - } -} -*/ - static void generate_db_fade (boost::shared_ptr<Evoral::ControlList> dst, double len, int num_steps, float dB_drop) { @@ -921,8 +909,6 @@ AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_ if ((prop = child->property ("is-xfade")) != 0) { _fade_in_is_xfade = string_is_affirmative (prop->value()); - } else { - _fade_in_is_xfade = false; } } else if (child->name() == "FadeOut") { @@ -950,8 +936,6 @@ AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_ if ((prop = child->property ("is-xfade")) != 0) { _fade_out_is_xfade = string_is_affirmative (prop->value()); - } else { - _fade_out_is_xfade = false; } } else if (child->name() == "InvFadeIn") { |