1
Fork 0

Fix audio file not loading loop and sync state

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-02-09 17:10:14 +00:00
parent 87a10022a1
commit 39540b7dc8
No known key found for this signature in database
GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 9 additions and 6 deletions

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

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;