add support for VST default values (instantiation time value)
This commit is contained in:
parent
fcf9836da0
commit
d6fd0486ae
@ -118,6 +118,7 @@ protected:
|
||||
|
||||
framepos_t _transport_frame;
|
||||
float _transport_speed;
|
||||
mutable std::map <uint32_t, float> _parameter_defaults;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -91,9 +91,9 @@ VSTPlugin::set_block_size (pframes_t nframes)
|
||||
}
|
||||
|
||||
float
|
||||
VSTPlugin::default_value (uint32_t)
|
||||
VSTPlugin::default_value (uint32_t which)
|
||||
{
|
||||
return 0;
|
||||
return _parameter_defaults[which];
|
||||
}
|
||||
|
||||
float
|
||||
@ -323,6 +323,9 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc)
|
||||
desc.sr_dependent = false;
|
||||
}
|
||||
|
||||
desc.normal = get_parameter (which);
|
||||
_parameter_defaults[which] = desc.normal;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user