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.
This commit is contained in:
@@ -22,14 +22,16 @@
|
||||
|
||||
#include "evoral/Control.hpp"
|
||||
#include "evoral/ControlList.hpp"
|
||||
#include "evoral/ParameterDescriptor.hpp"
|
||||
#include "evoral/TypeMap.hpp"
|
||||
|
||||
namespace Evoral {
|
||||
|
||||
Parameter::TypeMetadata Parameter::_type_metadata;
|
||||
|
||||
Control::Control(const Parameter& parameter, boost::shared_ptr<ControlList> list)
|
||||
Control::Control(const Parameter& parameter,
|
||||
const ParameterDescriptor& desc,
|
||||
boost::shared_ptr<ControlList> list)
|
||||
: _parameter(parameter)
|
||||
, _user_value(list ? list->default_value() : parameter.normal())
|
||||
, _user_value(list ? list->default_value() : desc.normal)
|
||||
{
|
||||
set_list (list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user