Add direct parameter changes to remote control, for LV2 and OSC
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
91cac905cc
commit
d0eba9e1ae
11 changed files with 136 additions and 33 deletions
|
|
@ -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, ¶mId, ¶mValue);
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue