Browse Source

Fix audio file not loading loop and sync state

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 3 years ago
parent
commit
39540b7dc8
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 9 additions and 6 deletions
  1. +1
    -1
      plugins/AriaModules
  2. +8
    -5
      plugins/Cardinal/src/AudioFile.cpp

+ 1
- 1
plugins/AriaModules

@@ -1 +1 @@
Subproject commit 39f02743e13a6499fb2e3794a87951af523bf003
Subproject commit 269ab0f091b18f08ab253bd8af4866e78d770bc0

+ 8
- 5
plugins/Cardinal/src/AudioFile.cpp View File

@@ -239,7 +239,7 @@ struct CarlaInternalPluginModule : Module, Thread {
const bool looping = fCarlaPluginDescriptor->get_parameter_value(fCarlaPluginHandle,
kParameterLooping) > 0.5f;
const bool hostSync = fCarlaPluginDescriptor->get_parameter_value(fCarlaPluginHandle,
kParameterLooping) > 0.5f;
kParameterHostSync) > 0.5f;

json_object_set_new(rootJ, "looping", json_boolean(looping));
json_object_set_new(rootJ, "hostSync", json_boolean(hostSync));
@@ -250,6 +250,8 @@ struct CarlaInternalPluginModule : Module, Thread {

void dataFromJson(json_t* const rootJ) override
{
fileChanged = false;

if (json_t* const filepathJ = json_object_get(rootJ, "filepath"))
{
const char* const filepath = json_string_value(filepathJ);
@@ -261,13 +263,14 @@ struct CarlaInternalPluginModule : Module, Thread {

if (fCarlaPluginHandle != nullptr)
fCarlaPluginDescriptor->set_custom_data(fCarlaPluginHandle, "file", filepath);

return;
}
}

currentFile.clear();
fileChanged = true;
if (! fileChanged)
{
currentFile.clear();
fileChanged = true;
}

if (fCarlaPluginHandle == nullptr)
return;


Loading…
Cancel
Save