diff options
author | David Robillard <d@drobilla.net> | 2014-12-01 14:28:03 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-01 23:35:24 -0500 |
commit | 767c0238a34ef4acc4d345e88cd5ddb0c8a8e421 (patch) | |
tree | fed11fb6f4e4e08a7c35eb45f53aea70dc66e4f8 /libs/ardour/audioregion.cc | |
parent | cb8abbe8d2f0e4dfe52bd35613ebba7689628eca (diff) |
Replace half-baked param metadata with descriptor.
Among other things, this means that automation controls/lists have the actual
min/max/normal/toggled of parameters, and not those inferred from the Parameter
ID, which is not correct for things like plugin parameters.
Pushing things down to the Evoral::ParmeterDescriptor may be useful in the
future to have lists do smarter things based on parameter range, but currently
I have just pushed down the above-mentioned currently used attributes.
Diffstat (limited to 'libs/ardour/audioregion.cc')
-rw-r--r-- | libs/ardour/audioregion.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 8c4eb6aa2a..506596430f 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -40,11 +40,13 @@ #include "ardour/session.h" #include "ardour/dB.h" #include "ardour/debug.h" +#include "ardour/event_type_map.h" #include "ardour/playlist.h" #include "ardour/audiofilesource.h" #include "ardour/region_factory.h" #include "ardour/runtime_functions.h" #include "ardour/transient_detector.h" +#include "ardour/parameter_descriptor.h" #include "ardour/progress.h" #include "i18n.h" @@ -1011,9 +1013,10 @@ AudioRegion::set_fade_in (boost::shared_ptr<AutomationList> f) void AudioRegion::set_fade_in (FadeShape shape, framecnt_t len) { - boost::shared_ptr<Evoral::ControlList> c1 (new Evoral::ControlList (FadeInAutomation)); - boost::shared_ptr<Evoral::ControlList> c2 (new Evoral::ControlList (FadeInAutomation)); - boost::shared_ptr<Evoral::ControlList> c3 (new Evoral::ControlList (FadeInAutomation)); + const ARDOUR::ParameterDescriptor desc(FadeInAutomation); + boost::shared_ptr<Evoral::ControlList> c1 (new Evoral::ControlList (FadeInAutomation, desc)); + boost::shared_ptr<Evoral::ControlList> c2 (new Evoral::ControlList (FadeInAutomation, desc)); + boost::shared_ptr<Evoral::ControlList> c3 (new Evoral::ControlList (FadeInAutomation, desc)); _fade_in->freeze (); _fade_in->clear (); @@ -1093,8 +1096,9 @@ AudioRegion::set_fade_out (boost::shared_ptr<AutomationList> f) void AudioRegion::set_fade_out (FadeShape shape, framecnt_t len) { - boost::shared_ptr<Evoral::ControlList> c1 (new Evoral::ControlList (FadeOutAutomation)); - boost::shared_ptr<Evoral::ControlList> c2 (new Evoral::ControlList (FadeOutAutomation)); + const ARDOUR::ParameterDescriptor desc(FadeOutAutomation); + boost::shared_ptr<Evoral::ControlList> c1 (new Evoral::ControlList (FadeOutAutomation, desc)); + boost::shared_ptr<Evoral::ControlList> c2 (new Evoral::ControlList (FadeOutAutomation, desc)); _fade_out->freeze (); _fade_out->clear (); |