Add direct parameter changes to remote control, for LV2 and OSC

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-12-29 17:20:35 +00:00
parent 91cac905cc
commit d0eba9e1ae
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
11 changed files with 136 additions and 33 deletions

View file

@ -794,6 +794,22 @@ protected:
void setState(const char* const key, const char* const value) override
{
#if CARDINAL_VARIANT_MINI
if (std::strcmp(key, "param") == 0)
{
int64_t moduleId = 0;
int paramId = 0;
float paramValue = 0.f;
std::sscanf(value, "%lu:%d:%f", &moduleId, &paramId, &paramValue);
rack::engine::Module* const module = context->engine->getModule(moduleId);
DISTRHO_SAFE_ASSERT_RETURN(module != nullptr,);
context->engine->setParamValue(module, paramId, paramValue);
return;
}
#endif
#ifndef HEADLESS
if (std::strcmp(key, "moduleInfos") == 0)
{