From 78d8ac03db1a584df21f7245daeeaa9696b62251 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 27 Feb 2019 13:50:51 +0100 Subject: [PATCH 1/6] Only use get_current_dir_name on Linux Signed-off-by: falkTX --- dgl/src/Window.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp index 47b2e458..7da52c75 100644 --- a/dgl/src/Window.cpp +++ b/dgl/src/Window.cpp @@ -1213,6 +1213,7 @@ bool Window::openFileBrowser(const FileBrowserOptions& options) String startDir(options.startDir); +# ifdef DISTRHO_OS_LINUX if (startDir.isEmpty()) { if (char* const dir_name = get_current_dir_name()) @@ -1221,6 +1222,7 @@ bool Window::openFileBrowser(const FileBrowserOptions& options) std::free(dir_name); } } +# endif DISTRHO_SAFE_ASSERT_RETURN(startDir.isNotEmpty(), false); From 3daa6cdcdadeb37cb85601e48b6959a6289d268e Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 27 Feb 2019 23:00:16 +0100 Subject: [PATCH 2/6] Fix generated ttl for plugins with instance access Signed-off-by: falkTX --- distrho/src/DistrhoPluginLV2export.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp index 4a27f787..3472ac31 100644 --- a/distrho/src/DistrhoPluginLV2export.cpp +++ b/distrho/src/DistrhoPluginLV2export.cpp @@ -153,8 +153,8 @@ void lv2_generate_ttl(const char* const basename) manifestString += " lv2:requiredFeature <" LV2_DATA_ACCESS_URI "> ,\n"; manifestString += " <" LV2_INSTANCE_ACCESS_URI "> ,\n"; manifestString += " <" LV2_OPTIONS__options "> ,\n"; - manifestString += " <" LV2_URID__map "> .\n"; - manifestString += " opts:supportedOption <" LV2_PARAMETERS__sampleRate "> .\n"; + manifestString += " <" LV2_URID__map "> ;\n"; + manifestString += " opts:supportedOption <" LV2_PARAMETERS__sampleRate "> ;\n"; # else // DISTRHO_PLUGIN_WANT_DIRECT_ACCESS manifestString += " rdfs:seeAlso <" + uiTTL + "> .\n"; # endif // DISTRHO_PLUGIN_WANT_DIRECT_ACCESS From 45a27ab64a5abd5991d3397c911fe5a30d777913 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 28 Feb 2019 01:12:13 +0100 Subject: [PATCH 3/6] More tweaks to transport Signed-off-by: falkTX --- distrho/src/DistrhoPluginVST.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/distrho/src/DistrhoPluginVST.cpp b/distrho/src/DistrhoPluginVST.cpp index 58fcbac3..c5cdd6e2 100644 --- a/distrho/src/DistrhoPluginVST.cpp +++ b/distrho/src/DistrhoPluginVST.cpp @@ -973,12 +973,12 @@ public: if (vstTimeInfo->flags & (kVstPpqPosValid|kVstTimeSigValid)) { const double ppqPos = std::abs(vstTimeInfo->ppqPos); - const double ppqPerBar = static_cast(vstTimeInfo->timeSigNumerator * 4) / vstTimeInfo->timeSigDenominator; + const int ppqPerBar = vstTimeInfo->timeSigNumerator * 4 / vstTimeInfo->timeSigDenominator; const double barBeats = (std::fmod(ppqPos, ppqPerBar) / ppqPerBar) * vstTimeInfo->timeSigNumerator; const double rest = std::fmod(barBeats, 1.0); - fTimePosition.bbt.bar = static_cast(ppqPos / ppqPerBar + 0.5) + 1; - fTimePosition.bbt.beat = static_cast(barBeats + 0.5) + 1; + fTimePosition.bbt.bar = static_cast(ppqPos) / ppqPerBar + 1; + fTimePosition.bbt.beat = static_cast(barBeats - rest + 0.5) + 1; fTimePosition.bbt.tick = static_cast(rest * fTimePosition.bbt.ticksPerBeat + 0.5); fTimePosition.bbt.beatsPerBar = vstTimeInfo->timeSigNumerator; fTimePosition.bbt.beatType = vstTimeInfo->timeSigDenominator; From c8877fe6d24bed3457bb59b83379479ffc88b7f3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 28 Feb 2019 07:49:07 +0100 Subject: [PATCH 4/6] Another fix for exported ttl for plugins with instance access Signed-off-by: falkTX --- distrho/src/DistrhoPluginLV2export.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp index 3472ac31..fce2e3f7 100644 --- a/distrho/src/DistrhoPluginLV2export.cpp +++ b/distrho/src/DistrhoPluginLV2export.cpp @@ -105,6 +105,9 @@ void lv2_generate_ttl(const char* const basename) String manifestString; manifestString += "@prefix lv2: <" LV2_CORE_PREFIX "> .\n"; manifestString += "@prefix rdfs: .\n"; +#if DISTRHO_PLUGIN_HAS_UI && DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + manifestString += "@prefix opts: <" LV2_OPTIONS_PREFIX "> .\n"; +#endif #if DISTRHO_PLUGIN_WANT_PROGRAMS manifestString += "@prefix pset: <" LV2_PRESETS_PREFIX "> .\n"; #endif From f2ed4d40048ef434f5d6e7076bb8e62407bdb9fd Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 12 Mar 2019 03:09:47 +0100 Subject: [PATCH 5/6] Add support for LV2 UI Touch --- distrho/src/DistrhoUILV2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/distrho/src/DistrhoUILV2.cpp b/distrho/src/DistrhoUILV2.cpp index 79c7e212..6431f9d7 100644 --- a/distrho/src/DistrhoUILV2.cpp +++ b/distrho/src/DistrhoUILV2.cpp @@ -388,6 +388,8 @@ static LV2UI_Handle lv2ui_instantiate(const LV2UI_Descriptor*, const char* uri, uiResize = (const LV2UI_Resize*)features[i]->data; else if (std::strcmp(features[i]->URI, LV2_UI__parent) == 0) parentId = features[i]->data; + else if (std::strcmp(features[i]->URI, LV2_UI__touch) == 0) + uiTouch = (const LV2UI_Touch*)features[i]->data; #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS else if (std::strcmp(features[i]->URI, LV2_DATA_ACCESS_URI) == 0) extData = (const LV2_Extension_Data_Feature*)features[i]->data; From e5d7199cb3610a90ec79230c4c3ae18b6e49ad60 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 16 Mar 2019 17:45:53 +0100 Subject: [PATCH 6/6] Yet another fix for exported ttl for plugins with instance access Signed-off-by: falkTX --- distrho/src/DistrhoPluginLV2export.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp index fce2e3f7..68b26721 100644 --- a/distrho/src/DistrhoPluginLV2export.cpp +++ b/distrho/src/DistrhoPluginLV2export.cpp @@ -157,7 +157,7 @@ void lv2_generate_ttl(const char* const basename) manifestString += " <" LV2_INSTANCE_ACCESS_URI "> ,\n"; manifestString += " <" LV2_OPTIONS__options "> ,\n"; manifestString += " <" LV2_URID__map "> ;\n"; - manifestString += " opts:supportedOption <" LV2_PARAMETERS__sampleRate "> ;\n"; + manifestString += " opts:supportedOption <" LV2_PARAMETERS__sampleRate "> .\n"; # else // DISTRHO_PLUGIN_WANT_DIRECT_ACCESS manifestString += " rdfs:seeAlso <" + uiTTL + "> .\n"; # endif // DISTRHO_PLUGIN_WANT_DIRECT_ACCESS