Fix audio file not loading loop and sync state
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
87a10022a1
commit
39540b7dc8
2 changed files with 9 additions and 6 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 39f02743e13a6499fb2e3794a87951af523bf003
|
Subproject commit 269ab0f091b18f08ab253bd8af4866e78d770bc0
|
|
@ -239,7 +239,7 @@ struct CarlaInternalPluginModule : Module, Thread {
|
||||||
const bool looping = fCarlaPluginDescriptor->get_parameter_value(fCarlaPluginHandle,
|
const bool looping = fCarlaPluginDescriptor->get_parameter_value(fCarlaPluginHandle,
|
||||||
kParameterLooping) > 0.5f;
|
kParameterLooping) > 0.5f;
|
||||||
const bool hostSync = fCarlaPluginDescriptor->get_parameter_value(fCarlaPluginHandle,
|
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, "looping", json_boolean(looping));
|
||||||
json_object_set_new(rootJ, "hostSync", json_boolean(hostSync));
|
json_object_set_new(rootJ, "hostSync", json_boolean(hostSync));
|
||||||
|
@ -250,6 +250,8 @@ struct CarlaInternalPluginModule : Module, Thread {
|
||||||
|
|
||||||
void dataFromJson(json_t* const rootJ) override
|
void dataFromJson(json_t* const rootJ) override
|
||||||
{
|
{
|
||||||
|
fileChanged = false;
|
||||||
|
|
||||||
if (json_t* const filepathJ = json_object_get(rootJ, "filepath"))
|
if (json_t* const filepathJ = json_object_get(rootJ, "filepath"))
|
||||||
{
|
{
|
||||||
const char* const filepath = json_string_value(filepathJ);
|
const char* const filepath = json_string_value(filepathJ);
|
||||||
|
@ -261,13 +263,14 @@ struct CarlaInternalPluginModule : Module, Thread {
|
||||||
|
|
||||||
if (fCarlaPluginHandle != nullptr)
|
if (fCarlaPluginHandle != nullptr)
|
||||||
fCarlaPluginDescriptor->set_custom_data(fCarlaPluginHandle, "file", filepath);
|
fCarlaPluginDescriptor->set_custom_data(fCarlaPluginHandle, "file", filepath);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
currentFile.clear();
|
if (! fileChanged)
|
||||||
fileChanged = true;
|
{
|
||||||
|
currentFile.clear();
|
||||||
|
fileChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (fCarlaPluginHandle == nullptr)
|
if (fCarlaPluginHandle == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue