From f68eda6c135cdaca4081ddb618c7b5be00a0cf2d Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 3 Jul 2014 03:58:37 +0100 Subject: [PATCH] Fix build --- source/backend/plugin/Lv2Plugin.cpp | 4 +++- source/backend/plugin/VstPlugin.cpp | 8 ++++---- source/bridges/CarlaBridgeUI-LV2.cpp | 2 ++ source/discovery/carla-discovery.cpp | 13 +++---------- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/source/backend/plugin/Lv2Plugin.cpp b/source/backend/plugin/Lv2Plugin.cpp index 1db215813..bbb3dce1e 100644 --- a/source/backend/plugin/Lv2Plugin.cpp +++ b/source/backend/plugin/Lv2Plugin.cpp @@ -1060,7 +1060,7 @@ public: if (index >= 0 && index < static_cast(fRdfDescriptor->PresetCount)) { - if (const LilvState* state = Lv2WorldClass::getInstance().getState(fRdfDescriptor->Presets[index].URI, (const LV2_URID_Map*)fFeatures[kFeatureIdUridMap]->data)) + if (LilvState* const state = Lv2WorldClass::getInstance().getState(fRdfDescriptor->Presets[index].URI, (const LV2_URID_Map*)fFeatures[kFeatureIdUridMap]->data)) { const ScopedSingleProcessLocker spl(this, (sendGui || sendOsc || sendCallback)); @@ -1068,6 +1068,8 @@ public: if (fHandle2 != nullptr) lilv_state_restore(state, fExt.state, fHandle2, carla_lilv_set_port_value, this, 0, fFeatures); + + lilv_state_free(state); } } diff --git a/source/backend/plugin/VstPlugin.cpp b/source/backend/plugin/VstPlugin.cpp index 48ea6392b..de4e2c4f8 100644 --- a/source/backend/plugin/VstPlugin.cpp +++ b/source/backend/plugin/VstPlugin.cpp @@ -71,7 +71,7 @@ public: carla_debug("VstPlugin::VstPlugin(%p, %i)", engine, id); carla_zeroStruct(fMidiEvents, kPluginMaxMidiEvents*2); - carla_zeroStruct(fTimeInfo); + carla_zeroStruct(fTimeInfo); for (ushort i=0; i < kPluginMaxMidiEvents*2; ++i) fEvents.data[i] = (VstEvent*)&fMidiEvents[i]; @@ -2365,9 +2365,9 @@ private: AEffect* fEffect; - uint32_t fMidiEventCount; - VstMidiEvent fMidiEvents[kPluginMaxMidiEvents*2]; - VstTimeInfo_R fTimeInfo; + uint32_t fMidiEventCount; + VstMidiEvent fMidiEvents[kPluginMaxMidiEvents*2]; + VstTimeInfo fTimeInfo; bool fNeedIdle; void* fLastChunk; diff --git a/source/bridges/CarlaBridgeUI-LV2.cpp b/source/bridges/CarlaBridgeUI-LV2.cpp index c03692947..06e00b8a7 100644 --- a/source/bridges/CarlaBridgeUI-LV2.cpp +++ b/source/bridges/CarlaBridgeUI-LV2.cpp @@ -15,6 +15,8 @@ * For a full copy of the GNU General Public License see the GPL.txt file */ +#undef HAVE_JUCE + #include "CarlaBridgeClient.hpp" #include "CarlaLv2Utils.hpp" #include "CarlaMIDI.h" diff --git a/source/discovery/carla-discovery.cpp b/source/discovery/carla-discovery.cpp index 7d8703d77..34ff90a41 100644 --- a/source/discovery/carla-discovery.cpp +++ b/source/discovery/carla-discovery.cpp @@ -34,7 +34,7 @@ # include "CarlaLadspaUtils.hpp" #endif #ifdef WANT_DSSI -# include "CarlaDssiUtils.hpp" +# include "CarlaDssiUtils.cpp" #endif #ifdef WANT_LV2 # include "CarlaLv2Utils.hpp" @@ -157,7 +157,7 @@ static intptr_t VSTCALLBACK vstHostCallback(AEffect* const effect, const int32_t { carla_debug("vstHostCallback(%p, %i:%s, %i, " P_INTPTR ", %p, %f)", effect, opcode, vstMasterOpcode2str(opcode), index, value, ptr, opt); - static VstTimeInfo_R timeInfo; + static VstTimeInfo timeInfo; intptr_t ret = 0; switch (opcode) @@ -187,7 +187,7 @@ static intptr_t VSTCALLBACK vstHostCallback(AEffect* const effect, const int32_t if (! gVstIsProcessing) DISCOVERY_OUT("warning", "plugin requested timeInfo out of process"); if (! gVstWantsTime) DISCOVERY_OUT("warning", "plugin requested timeInfo but didn't ask if host could do \"sendVstTimeInfo\""); - carla_zeroStruct(timeInfo); + carla_zeroStruct(timeInfo); timeInfo.sampleRate = kSampleRate; // Tempo @@ -1920,10 +1920,3 @@ int main(int argc, char* argv[]) } // -------------------------------------------------------------------------- -// Extras - -#ifdef WANT_DSSI -# include "CarlaDssiUtils.cpp" -#endif - -// --------------------------------------------------------------------------