Fix a problem where VST automation data wasn't getting written (if the adjustments were made from the plugin's own controls)

This commit is contained in:
John Emmas 2015-10-14 14:54:27 +01:00
parent 334cc37e1b
commit 8d46cc99fe
5 changed files with 15 additions and 1 deletions

View File

@ -274,6 +274,7 @@ protected:
friend class PluginInsert;
virtual void set_parameter (uint32_t which, float val);
virtual void set_parameter_automated (uint32_t which, float val);
/** Do the actual saving of the current plugin settings to a preset of the provided name.
* Should return a URI on success, or an empty string on failure.

View File

@ -46,6 +46,7 @@ public:
float get_parameter (uint32_t port) const;
uint32_t nth_parameter (uint32_t port, bool& ok) const;
void set_parameter (uint32_t port, float val);
void set_parameter_automated (uint32_t port, float val);
bool load_preset (PresetRecord);
int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
std::string describe_parameter (Evoral::Parameter);

View File

@ -365,6 +365,12 @@ Plugin::set_parameter (uint32_t which, float)
ParameterChanged (which, get_parameter (which)); /* EMIT SIGNAL */
}
void
Plugin::set_parameter_automated (uint32_t which, float val)
{
Plugin::set_parameter (which, val);
}
int
Plugin::set_state (const XMLNode& node, int /*version*/)
{

View File

@ -86,7 +86,7 @@ intptr_t Session::vst_callback (
SHOW_CALLBACK ("audioMasterAutomate");
// index, value, returns 0
if (plug) {
plug->set_parameter (index, opt);
plug->set_parameter_automated (index, opt);
}
return 0;

View File

@ -117,6 +117,12 @@ VSTPlugin::set_parameter (uint32_t which, float newval)
}
}
void
VSTPlugin::set_parameter_automated (uint32_t which, float newval)
{
Plugin::set_parameter_automated (which, newval);
}
uint32_t
VSTPlugin::nth_parameter (uint32_t n, bool& ok) const
{