Browse Source

Cleanup for CARLA_DECLARE_NON_COPYABLE macro use, minor jsfx things

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.0
falkTX 3 years ago
parent
commit
91cee1f997
98 changed files with 548 additions and 601 deletions
  1. +9
    -9
      source/backend/CarlaEngine.hpp
  2. +3
    -3
      source/backend/CarlaHost.h
  3. +1
    -1
      source/backend/CarlaHostImpl.hpp
  4. +4
    -4
      source/backend/CarlaPlugin.hpp
  5. +2
    -2
      source/backend/CarlaStandaloneNSM.cpp
  6. +1
    -1
      source/backend/CarlaUtils.h
  7. +1
    -1
      source/backend/engine/CarlaEngineBridge.cpp
  8. +4
    -4
      source/backend/engine/CarlaEngineClient.hpp
  9. +6
    -6
      source/backend/engine/CarlaEngineGraph.hpp
  10. +10
    -10
      source/backend/engine/CarlaEngineInternal.hpp
  11. +1
    -1
      source/backend/engine/CarlaEngineJack.cpp
  12. +2
    -2
      source/backend/engine/CarlaEngineNative.cpp
  13. +2
    -2
      source/backend/engine/CarlaEnginePorts.hpp
  14. +3
    -3
      source/backend/plugin/CarlaPlugin.cpp
  15. +7
    -7
      source/backend/plugin/CarlaPluginBridge.cpp
  16. +3
    -3
      source/backend/plugin/CarlaPluginFluidSynth.cpp
  17. +13
    -13
      source/backend/plugin/CarlaPluginInternal.hpp
  18. +141
    -126
      source/backend/plugin/CarlaPluginJSFX.cpp
  19. +3
    -3
      source/backend/plugin/CarlaPluginJack.cpp
  20. +5
    -5
      source/backend/plugin/CarlaPluginJuce.cpp
  21. +4
    -4
      source/backend/plugin/CarlaPluginLADSPADSSI.cpp
  22. +10
    -10
      source/backend/plugin/CarlaPluginLV2.cpp
  23. +7
    -7
      source/backend/plugin/CarlaPluginNative.cpp
  24. +1
    -1
      source/backend/plugin/CarlaPluginSFZero.cpp
  25. +6
    -6
      source/backend/plugin/CarlaPluginVST2.cpp
  26. +33
    -23
      source/backend/plugin/CarlaPluginVST3.cpp
  27. +10
    -8
      source/backend/utils/CachedPlugins.cpp
  28. +3
    -3
      source/discovery/carla-discovery.cpp
  29. +3
    -14
      source/includes/CarlaDefines.h
  30. +3
    -3
      source/includes/CarlaNativePrograms.hpp
  31. +4
    -4
      source/includes/ladspa_rdf.hpp
  32. +11
    -11
      source/includes/lv2_rdf.hpp
  33. +1
    -1
      source/interposer/interposer-jack-x11.cpp
  34. +3
    -3
      source/jackbridge/JackBridge1.cpp
  35. +1
    -1
      source/jackbridge/JackBridgeExport.cpp
  36. +2
    -2
      source/libjack/libjack.cpp
  37. +6
    -6
      source/libjack/libjack.hpp
  38. +1
    -1
      source/modules/lilv/lilv-0.24.0/lilv/lilvmm.hpp
  39. +2
    -2
      source/modules/water/buffers/AudioSampleBuffer.h
  40. +2
    -3
      source/modules/water/containers/ArrayAllocationBase.h
  41. +2
    -2
      source/modules/water/containers/HashMap.h
  42. +3
    -3
      source/modules/water/containers/LinkedListPointer.h
  43. +2
    -2
      source/modules/water/containers/OwnedArray.h
  44. +3
    -3
      source/modules/water/files/DirectoryIterator.h
  45. +11
    -11
      source/modules/water/files/File.cpp
  46. +6
    -6
      source/modules/water/files/File.h
  47. +2
    -2
      source/modules/water/files/FileInputStream.h
  48. +2
    -2
      source/modules/water/files/FileOutputStream.h
  49. +2
    -2
      source/modules/water/files/TemporaryFile.h
  50. +2
    -2
      source/modules/water/memory/ByteOrder.h
  51. +2
    -2
      source/modules/water/memory/HeapBlock.h
  52. +3
    -3
      source/modules/water/memory/ReferenceCountedObject.h
  53. +2
    -2
      source/modules/water/midi/MidiBuffer.h
  54. +1
    -1
      source/modules/water/midi/MidiMessageSequence.h
  55. +2
    -2
      source/modules/water/processors/AudioProcessor.h
  56. +12
    -12
      source/modules/water/processors/AudioProcessorGraph.cpp
  57. +4
    -4
      source/modules/water/processors/AudioProcessorGraph.h
  58. +2
    -2
      source/modules/water/streams/FileInputSource.h
  59. +2
    -2
      source/modules/water/streams/InputStream.h
  60. +2
    -2
      source/modules/water/streams/MemoryInputStream.h
  61. +2
    -2
      source/modules/water/streams/MemoryOutputStream.h
  62. +2
    -2
      source/modules/water/streams/OutputStream.h
  63. +3
    -3
      source/modules/water/threads/ChildProcess.cpp
  64. +2
    -2
      source/modules/water/threads/ChildProcess.h
  65. +4
    -4
      source/modules/water/threads/ScopedLock.h
  66. +2
    -2
      source/modules/water/threads/SpinLock.h
  67. +2
    -2
      source/modules/water/xml/XmlDocument.h
  68. +3
    -3
      source/native-plugins/audio-base.hpp
  69. +1
    -1
      source/native-plugins/audio-file.cpp
  70. +2
    -2
      source/native-plugins/bigmeter.cpp
  71. +1
    -1
      source/native-plugins/external
  72. +1
    -1
      source/plugin/carla-lv2-ui.cpp
  73. +3
    -3
      source/plugin/carla-vst.cpp
  74. +1
    -1
      source/plugin/ui_launcher.cpp
  75. +1
    -1
      source/theme/CarlaStyle.hpp
  76. +1
    -1
      source/theme/CarlaStylePlugin.hpp
  77. +2
    -2
      source/utils/CarlaBinaryUtils.hpp
  78. +5
    -5
      source/utils/CarlaBridgeUtils.hpp
  79. +12
    -8
      source/utils/CarlaDssiUtils.cpp
  80. +2
    -2
      source/utils/CarlaEngineUtils.hpp
  81. +47
    -119
      source/utils/CarlaJsfxUtils.hpp
  82. +2
    -2
      source/utils/CarlaJuceUtils.hpp
  83. +1
    -1
      source/utils/CarlaLogThread.hpp
  84. +4
    -4
      source/utils/CarlaLv2Utils.hpp
  85. +7
    -7
      source/utils/CarlaMutex.hpp
  86. +2
    -2
      source/utils/CarlaOscUtils.hpp
  87. +2
    -2
      source/utils/CarlaPipeUtils.cpp
  88. +2
    -2
      source/utils/CarlaPluginUI.cpp
  89. +2
    -2
      source/utils/CarlaPluginUI.hpp
  90. +3
    -3
      source/utils/CarlaProcessUtils.hpp
  91. +4
    -4
      source/utils/CarlaRingBuffer.hpp
  92. +3
    -3
      source/utils/CarlaScopeUtils.hpp
  93. +4
    -4
      source/utils/CarlaStateUtils.hpp
  94. +2
    -2
      source/utils/CarlaThread.hpp
  95. +3
    -3
      source/utils/LinkedList.hpp
  96. +2
    -2
      source/utils/Lv2AtomRingBuffer.hpp
  97. +3
    -3
      source/utils/RtLinkedList.hpp
  98. +2
    -2
      source/utils/ThreadSafeFFTW.hpp

+ 9
- 9
source/backend/CarlaEngine.hpp View File

@@ -293,14 +293,14 @@ struct CARLA_API EngineOptions {


Wine() noexcept; Wine() noexcept;
~Wine() noexcept; ~Wine() noexcept;
CARLA_DECLARE_NON_COPY_STRUCT(Wine)
CARLA_DECLARE_NON_COPYABLE(Wine)
} wine; } wine;
#endif #endif


#ifndef DOXYGEN #ifndef DOXYGEN
EngineOptions() noexcept; EngineOptions() noexcept;
~EngineOptions() noexcept; ~EngineOptions() noexcept;
CARLA_DECLARE_NON_COPY_STRUCT(EngineOptions)
CARLA_DECLARE_NON_COPYABLE(EngineOptions)
#endif #endif
}; };


@@ -426,7 +426,7 @@ protected:
const bool kIsInput; const bool kIsInput;
const uint32_t kIndexOffset; const uint32_t kIndexOffset;


CARLA_DECLARE_NON_COPY_CLASS(CarlaEnginePort)
CARLA_DECLARE_NON_COPYABLE(CarlaEnginePort)
#endif #endif
}; };


@@ -473,7 +473,7 @@ public:
protected: protected:
float* fBuffer; float* fBuffer;


CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineAudioPort)
CARLA_DECLARE_NON_COPYABLE(CarlaEngineAudioPort)
#endif #endif
}; };


@@ -535,7 +535,7 @@ protected:
float* fBuffer; float* fBuffer;
float fMinimum, fMaximum; float fMinimum, fMaximum;


CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineCVPort)
CARLA_DECLARE_NON_COPYABLE(CarlaEngineCVPort)
#endif #endif
}; };


@@ -626,7 +626,7 @@ protected:
friend class CarlaPluginInstance; friend class CarlaPluginInstance;
friend class CarlaEngineCVSourcePorts; friend class CarlaEngineCVSourcePorts;


CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineEventPort)
CARLA_DECLARE_NON_COPYABLE(CarlaEngineEventPort)
#endif #endif
}; };


@@ -682,7 +682,7 @@ protected:
*/ */
CarlaEngineCVSourcePorts(); CarlaEngineCVSourcePorts();


CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineCVSourcePorts)
CARLA_DECLARE_NON_COPYABLE(CarlaEngineCVSourcePorts)
#endif #endif
}; };


@@ -795,7 +795,7 @@ protected:
*/ */
CarlaEngineClient(ProtectedData* pData); CarlaEngineClient(ProtectedData* pData);


CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineClient)
CARLA_DECLARE_NON_COPYABLE(CarlaEngineClient)
#endif #endif
}; };


@@ -1387,7 +1387,7 @@ protected:


// ------------------------------------------------------------------- // -------------------------------------------------------------------


CARLA_DECLARE_NON_COPY_CLASS(CarlaEngine)
CARLA_DECLARE_NON_COPYABLE(CarlaEngine)
}; };


/**@}*/ /**@}*/


+ 3
- 3
source/backend/CarlaHost.h View File

@@ -138,7 +138,7 @@ typedef struct _CarlaPluginInfo {
*/ */
CARLA_API _CarlaPluginInfo() noexcept; CARLA_API _CarlaPluginInfo() noexcept;
CARLA_API ~_CarlaPluginInfo() noexcept; CARLA_API ~_CarlaPluginInfo() noexcept;
CARLA_DECLARE_NON_COPY_STRUCT(_CarlaPluginInfo)
CARLA_DECLARE_NON_COPYABLE(_CarlaPluginInfo)
#endif #endif


} CarlaPluginInfo; } CarlaPluginInfo;
@@ -204,7 +204,7 @@ typedef struct _CarlaParameterInfo {
*/ */
CARLA_API _CarlaParameterInfo() noexcept; CARLA_API _CarlaParameterInfo() noexcept;
CARLA_API ~_CarlaParameterInfo() noexcept; CARLA_API ~_CarlaParameterInfo() noexcept;
CARLA_DECLARE_NON_COPY_STRUCT(_CarlaParameterInfo)
CARLA_DECLARE_NON_COPYABLE(_CarlaParameterInfo)
#endif #endif


} CarlaParameterInfo; } CarlaParameterInfo;
@@ -230,7 +230,7 @@ typedef struct _CarlaScalePointInfo {
*/ */
CARLA_API _CarlaScalePointInfo() noexcept; CARLA_API _CarlaScalePointInfo() noexcept;
CARLA_API ~_CarlaScalePointInfo() noexcept; CARLA_API ~_CarlaScalePointInfo() noexcept;
CARLA_DECLARE_NON_COPY_STRUCT(_CarlaScalePointInfo)
CARLA_DECLARE_NON_COPYABLE(_CarlaScalePointInfo)
#endif #endif


} CarlaScalePointInfo; } CarlaScalePointInfo;


+ 1
- 1
source/backend/CarlaHostImpl.hpp View File

@@ -87,7 +87,7 @@ struct CarlaHostStandalone : CarlaHostHandleImpl {
} }


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_STRUCT(CarlaHostStandalone)
CARLA_DECLARE_NON_COPYABLE(CarlaHostStandalone)
}; };


// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------


+ 4
- 4
source/backend/CarlaPlugin.hpp View File

@@ -586,7 +586,7 @@ public:
/*! /*!
* Overloaded function, to be called from within RT context only. * Overloaded function, to be called from within RT context only.
*/ */
virtual void setParameterValueRT(uint32_t parameterId, float value, bool sendCallbackLater) noexcept;
virtual void setParameterValueRT(uint32_t parameterId, float value, uint32_t frameOffset, bool sendCallbackLater) noexcept;


/*! /*!
* Set a plugin's parameter value, including internal parameters. * Set a plugin's parameter value, including internal parameters.
@@ -1040,7 +1040,7 @@ protected:
bool fWasEnabled; bool fWasEnabled;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(ScopedDisabler)
CARLA_DECLARE_NON_COPYABLE(ScopedDisabler)
}; };


/*! /*!
@@ -1059,12 +1059,12 @@ protected:
const bool fBlock; const bool fBlock;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(ScopedSingleProcessLocker)
CARLA_DECLARE_NON_COPYABLE(ScopedSingleProcessLocker)
}; };


friend class CarlaEngine; friend class CarlaEngine;
friend class CarlaEngineBridge; friend class CarlaEngineBridge;
CARLA_DECLARE_NON_COPY_CLASS(CarlaPlugin)
CARLA_DECLARE_NON_COPYABLE(CarlaPlugin)
}; };


/**@}*/ /**@}*/


+ 2
- 2
source/backend/CarlaStandaloneNSM.cpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Standalone * Carla Standalone
* Copyright (C) 2011-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -635,7 +635,7 @@ private:
#undef handlePtr #undef handlePtr


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(CarlaNSM)
CARLA_DECLARE_NON_COPYABLE(CarlaNSM)
}; };


#endif // HAVE_LIBLO #endif // HAVE_LIBLO


+ 1
- 1
source/backend/CarlaUtils.h View File

@@ -133,7 +133,7 @@ typedef struct _CarlaCachedPluginInfo {
* C++ constructor. * C++ constructor.
*/ */
CARLA_API _CarlaCachedPluginInfo() noexcept; CARLA_API _CarlaCachedPluginInfo() noexcept;
CARLA_DECLARE_NON_COPY_STRUCT(_CarlaCachedPluginInfo)
CARLA_DECLARE_NON_COPYABLE(_CarlaCachedPluginInfo)
#endif #endif


} CarlaCachedPluginInfo; } CarlaCachedPluginInfo;


+ 1
- 1
source/backend/engine/CarlaEngineBridge.cpp View File

@@ -88,7 +88,7 @@ protected:
private: private:
LatencyChangedCallback* const fLatencyCallback; LatencyChangedCallback* const fLatencyCallback;


CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineBridgeClient)
CARLA_DECLARE_NON_COPYABLE(CarlaEngineBridgeClient)
}; };


// ------------------------------------------------------------------- // -------------------------------------------------------------------


+ 4
- 4
source/backend/engine/CarlaEngineClient.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Plugin Host * Carla Plugin Host
* Copyright (C) 2011-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -63,7 +63,7 @@ struct CarlaEngineClient::ProtectedData {


#ifdef CARLA_PROPER_CPP11_SUPPORT #ifdef CARLA_PROPER_CPP11_SUPPORT
ProtectedData() = delete; ProtectedData() = delete;
CARLA_DECLARE_NON_COPY_STRUCT(ProtectedData)
CARLA_DECLARE_NON_COPYABLE(ProtectedData)
#endif #endif
}; };


@@ -96,7 +96,7 @@ protected:
return pData->plugin; return pData->plugin;
} }


CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineClientForStandalone)
CARLA_DECLARE_NON_COPYABLE(CarlaEngineClientForStandalone)
}; };
typedef CarlaEngineClientForStandalone CarlaEngineClientForSubclassing; typedef CarlaEngineClientForStandalone CarlaEngineClientForSubclassing;
#else #else
@@ -112,7 +112,7 @@ public:
delete pData; delete pData;
} }


CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineClientForBridge)
CARLA_DECLARE_NON_COPYABLE(CarlaEngineClientForBridge)
}; };
typedef CarlaEngineClientForBridge CarlaEngineClientForSubclassing; typedef CarlaEngineClientForBridge CarlaEngineClientForSubclassing;
#endif #endif


+ 6
- 6
source/backend/engine/CarlaEngineGraph.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Plugin Host * Carla Plugin Host
* Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -81,7 +81,7 @@ struct ExternalGraphPorts {
uint getPortId(bool isInput, const char portName[], bool* ok = nullptr) const noexcept; uint getPortId(bool isInput, const char portName[], bool* ok = nullptr) const noexcept;
ExternalGraphPorts() noexcept; ExternalGraphPorts() noexcept;
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(ExternalGraphPorts)
CARLA_DECLARE_NON_COPYABLE(ExternalGraphPorts)
}; };


struct ExternalGraph { struct ExternalGraph {
@@ -108,7 +108,7 @@ struct ExternalGraph {


CarlaEngine* const kEngine; CarlaEngine* const kEngine;
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(ExternalGraph)
CARLA_DECLARE_NON_COPYABLE(ExternalGraph)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -134,7 +134,7 @@ struct RackGraph {
~Buffers() noexcept; ~Buffers() noexcept;
void setBufferSize(uint32_t bufferSize, bool createBuffers) noexcept; void setBufferSize(uint32_t bufferSize, bool createBuffers) noexcept;
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(Buffers)
CARLA_DECLARE_NON_COPYABLE(Buffers)
} audioBuffers; } audioBuffers;


RackGraph(CarlaEngine* engine, uint32_t inputs, uint32_t outputs) noexcept; RackGraph(CarlaEngine* engine, uint32_t inputs, uint32_t outputs) noexcept;
@@ -157,7 +157,7 @@ struct RackGraph {
void processHelper(CarlaEngine::ProtectedData* data, const float* const* inBuf, float* const* outBuf, uint32_t frames); void processHelper(CarlaEngine::ProtectedData* data, const float* const* inBuf, float* const* outBuf, uint32_t frames);


CarlaEngine* const kEngine; CarlaEngine* const kEngine;
CARLA_DECLARE_NON_COPY_CLASS(RackGraph)
CARLA_DECLARE_NON_COPYABLE(RackGraph)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -219,7 +219,7 @@ private:
void run() override; void run() override;


CarlaEngine* const kEngine; CarlaEngine* const kEngine;
CARLA_DECLARE_NON_COPY_CLASS(PatchbayGraph)
CARLA_DECLARE_NON_COPYABLE(PatchbayGraph)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 10
- 10
source/backend/engine/CarlaEngineInternal.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Plugin Host * Carla Plugin Host
* Copyright (C) 2011-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -64,7 +64,7 @@ struct EngineInternalEvents {
~EngineInternalEvents() noexcept; ~EngineInternalEvents() noexcept;
void clear() noexcept; void clear() noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalEvents)
CARLA_DECLARE_NON_COPYABLE(EngineInternalEvents)
}; };


#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH
@@ -137,7 +137,7 @@ private:
CarlaEngine* const kEngine; CarlaEngine* const kEngine;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalGraph)
CARLA_DECLARE_NON_COPYABLE(EngineInternalGraph)
}; };
#endif // BUILD_BRIDGE_ALTERNATIVE_ARCH #endif // BUILD_BRIDGE_ALTERNATIVE_ARCH


@@ -174,7 +174,7 @@ private:


Hylia(); Hylia();
~Hylia(); ~Hylia();
CARLA_DECLARE_NON_COPY_STRUCT(Hylia)
CARLA_DECLARE_NON_COPYABLE(Hylia)
} hylia; } hylia;
#endif #endif


@@ -188,7 +188,7 @@ private:
friend class CarlaEngineJack; friend class CarlaEngineJack;
void fillJackTimeInfo(jack_position_t* pos, uint32_t newFrames) noexcept; void fillJackTimeInfo(jack_position_t* pos, uint32_t newFrames) noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalTime)
CARLA_DECLARE_NON_COPYABLE(EngineInternalTime)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -218,7 +218,7 @@ struct EngineNextAction {
~EngineNextAction() noexcept; ~EngineNextAction() noexcept;
void clearAndReset() noexcept; void clearAndReset() noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(EngineNextAction)
CARLA_DECLARE_NON_COPYABLE(EngineNextAction)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -323,7 +323,7 @@ struct CarlaEngine::ProtectedData {


#ifdef CARLA_PROPER_CPP11_SUPPORT #ifdef CARLA_PROPER_CPP11_SUPPORT
ProtectedData() = delete; ProtectedData() = delete;
CARLA_DECLARE_NON_COPY_STRUCT(ProtectedData)
CARLA_DECLARE_NON_COPYABLE(ProtectedData)
#endif #endif
}; };


@@ -342,7 +342,7 @@ private:
int64_t prevTime; int64_t prevTime;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(PendingRtEventsRunner)
CARLA_DECLARE_NON_COPYABLE(PendingRtEventsRunner)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -357,7 +357,7 @@ private:
CarlaEngine::ProtectedData* const pData; CarlaEngine::ProtectedData* const pData;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(ScopedActionLock)
CARLA_DECLARE_NON_COPYABLE(ScopedActionLock)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -373,7 +373,7 @@ private:
CarlaEngine::ProtectedData* const pData; CarlaEngine::ProtectedData* const pData;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(ScopedThreadStopper)
CARLA_DECLARE_NON_COPYABLE(ScopedThreadStopper)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 1
- 1
source/backend/engine/CarlaEngineJack.cpp View File

@@ -771,7 +771,7 @@ private:
EngineEvent* fBuffer; EngineEvent* fBuffer;
EngineEvent* fBufferToDeleteLater; EngineEvent* fBufferToDeleteLater;


CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineJackCVSourcePorts)
CARLA_DECLARE_NON_COPYABLE(CarlaEngineJackCVSourcePorts)
}; };
#endif #endif




+ 2
- 2
source/backend/engine/CarlaEngineNative.cpp View File

@@ -1019,7 +1019,7 @@ protected:
{ {
uint32_t rindex = index; uint32_t rindex = index;
if (const CarlaPluginPtr plugin = _getPluginForParameterIndex(rindex)) if (const CarlaPluginPtr plugin = _getPluginForParameterIndex(rindex))
plugin->setParameterValueRT(rindex, value, false);
plugin->setParameterValueRT(rindex, value, 0, false);


fParameters[index] = value; fParameters[index] = value;
} }
@@ -1710,7 +1710,7 @@ private:
CarlaJUCE::dispatchMessageManagerMessages(); CarlaJUCE::dispatchMessageManagerMessages();
} }


CARLA_DECLARE_NON_COPY_STRUCT(ScopedJuceMessageThreadRunner)
CARLA_DECLARE_NON_COPYABLE(ScopedJuceMessageThreadRunner)
}; };
#endif #endif




+ 2
- 2
source/backend/engine/CarlaEnginePorts.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Plugin Host * Carla Plugin Host
* Copyright (C) 2011-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -63,7 +63,7 @@ struct CarlaEngineCVSourcePorts::ProtectedData {
cvs.clear(); cvs.clear();
} }


CARLA_DECLARE_NON_COPY_STRUCT(ProtectedData)
CARLA_DECLARE_NON_COPYABLE(ProtectedData)
}; };


#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH


+ 3
- 3
source/backend/plugin/CarlaPlugin.cpp View File

@@ -75,7 +75,7 @@ struct ParamSymbol {


#ifdef CARLA_PROPER_CPP11_SUPPORT #ifdef CARLA_PROPER_CPP11_SUPPORT
ParamSymbol() = delete; ParamSymbol() = delete;
CARLA_DECLARE_NON_COPY_STRUCT(ParamSymbol)
CARLA_DECLARE_NON_COPYABLE(ParamSymbol)
#endif #endif
}; };


@@ -573,7 +573,7 @@ const CarlaStateSave& CarlaPlugin::getStateSave(const bool callPrepareForSave)
{ {
pData->stateSave.chunk = CarlaString::asBase64(data, dataSize).dup(); pData->stateSave.chunk = CarlaString::asBase64(data, dataSize).dup();


if (pluginType != PLUGIN_INTERNAL)
if (pluginType != PLUGIN_INTERNAL && pluginType != PLUGIN_JSFX)
usingChunk = true; usingChunk = true;
} }
} }
@@ -1672,7 +1672,7 @@ void CarlaPlugin::setParameterValue(const uint32_t parameterId, const float valu
nullptr); nullptr);
} }


void CarlaPlugin::setParameterValueRT(const uint32_t parameterId, const float value, const bool sendCallbackLater) noexcept
void CarlaPlugin::setParameterValueRT(const uint32_t parameterId, const float value, uint32_t, const bool sendCallbackLater) noexcept
{ {
pData->postponeParameterChangeRtEvent(sendCallbackLater, static_cast<int32_t>(parameterId), value); pData->postponeParameterChangeRtEvent(sendCallbackLater, static_cast<int32_t>(parameterId), value);
} }


+ 7
- 7
source/backend/plugin/CarlaPluginBridge.cpp View File

@@ -79,7 +79,7 @@ struct BridgeParamInfo {
symbol(), symbol(),
unit() {} unit() {}


CARLA_DECLARE_NON_COPY_STRUCT(BridgeParamInfo)
CARLA_DECLARE_NON_COPYABLE(BridgeParamInfo)
}; };


// --------------------------------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------------------------------
@@ -771,7 +771,7 @@ public:
CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback); CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback);
} }


void setParameterValueRT(const uint32_t parameterId, const float value, const bool sendCallbackLater) noexcept override
void setParameterValueRT(const uint32_t parameterId, const float value, const uint32_t frameOffset, const bool sendCallbackLater) noexcept override
{ {
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);


@@ -788,7 +788,7 @@ public:
fShmNonRtClientControl.waitIfDataIsReachingLimit(); fShmNonRtClientControl.waitIfDataIsReachingLimit();
} }


CarlaPlugin::setParameterValueRT(parameterId, fixedValue, sendCallbackLater);
CarlaPlugin::setParameterValueRT(parameterId, fixedValue, frameOffset, sendCallbackLater);
} }


void setParameterMidiChannel(const uint32_t parameterId, const uint8_t channel, const bool sendOsc, const bool sendCallback) noexcept override void setParameterMidiChannel(const uint32_t parameterId, const uint8_t channel, const bool sendOsc, const bool sendCallback) noexcept override
@@ -1503,7 +1503,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
continue; continue;
} }


@@ -1564,7 +1564,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
} }


#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH
@@ -2989,7 +2989,7 @@ private:
char* strBuf; char* strBuf;
CarlaMutex mutex; CarlaMutex mutex;


CARLA_DECLARE_NON_COPY_CLASS(ReceivingParamText)
CARLA_DECLARE_NON_COPYABLE(ReceivingParamText)
} fReceivingParamText; } fReceivingParamText;


struct Info { struct Info {
@@ -3081,7 +3081,7 @@ private:
aIns = aOuts = cvIns = cvOuts = 0; aIns = aOuts = cvIns = cvOuts = 0;
} }


CARLA_DECLARE_NON_COPY_STRUCT(Info)
CARLA_DECLARE_NON_COPYABLE(Info)
} fInfo; } fInfo;


int64_t fUniqueId; int64_t fUniqueId;


+ 3
- 3
source/backend/plugin/CarlaPluginFluidSynth.cpp View File

@@ -424,11 +424,11 @@ public:
CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback); CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback);
} }


void setParameterValueRT(const uint32_t parameterId, const float value, const bool sendCallbackLater) noexcept override
void setParameterValueRT(const uint32_t parameterId, const float value, const uint32_t frameOffset, const bool sendCallbackLater) noexcept override
{ {
const float fixedValue = setParameterValueInFluidSynth(parameterId, value); const float fixedValue = setParameterValueInFluidSynth(parameterId, value);


CarlaPlugin::setParameterValueRT(parameterId, fixedValue, sendCallbackLater);
CarlaPlugin::setParameterValueRT(parameterId, fixedValue, frameOffset, sendCallbackLater);
} }


float setParameterValueInFluidSynth(const uint32_t parameterId, const float value) noexcept float setParameterValueInFluidSynth(const uint32_t parameterId, const float value) noexcept
@@ -1299,7 +1299,7 @@ public:
continue; continue;


value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
} }


if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE) if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE)


+ 13
- 13
source/backend/plugin/CarlaPluginInternal.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Plugin * Carla Plugin
* Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -142,7 +142,7 @@ struct PluginAudioData {
void clear() noexcept; void clear() noexcept;
void initBuffers() const noexcept; void initBuffers() const noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(PluginAudioData)
CARLA_DECLARE_NON_COPYABLE(PluginAudioData)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -163,7 +163,7 @@ struct PluginCVData {
void clear() noexcept; void clear() noexcept;
void initBuffers() const noexcept; void initBuffers() const noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(PluginCVData)
CARLA_DECLARE_NON_COPYABLE(PluginCVData)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -180,7 +180,7 @@ struct PluginEventData {
void clear() noexcept; void clear() noexcept;
void initBuffers() const noexcept; void initBuffers() const noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(PluginEventData)
CARLA_DECLARE_NON_COPYABLE(PluginEventData)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -199,7 +199,7 @@ struct PluginParameterData {
float getFinalUnnormalizedValue(uint32_t parameterId, float normalizedValue) const noexcept; float getFinalUnnormalizedValue(uint32_t parameterId, float normalizedValue) const noexcept;
float getFinalValueWithMidiDelta(uint32_t parameterId, float value, int8_t delta) const noexcept; float getFinalValueWithMidiDelta(uint32_t parameterId, float value, int8_t delta) const noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(PluginParameterData)
CARLA_DECLARE_NON_COPYABLE(PluginParameterData)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -216,7 +216,7 @@ struct PluginProgramData {
void createNew(uint32_t newCount); void createNew(uint32_t newCount);
void clear() noexcept; void clear() noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(PluginProgramData)
CARLA_DECLARE_NON_COPYABLE(PluginProgramData)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -232,7 +232,7 @@ struct PluginMidiProgramData {
void clear() noexcept; void clear() noexcept;
const MidiProgramData& getCurrent() const noexcept; const MidiProgramData& getCurrent() const noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(PluginMidiProgramData)
CARLA_DECLARE_NON_COPYABLE(PluginMidiProgramData)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -298,7 +298,7 @@ struct CarlaPlugin::ProtectedData {
void appendNonRT(const ExternalMidiNote& note) noexcept; void appendNonRT(const ExternalMidiNote& note) noexcept;
void clear() noexcept; void clear() noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(ExternalNotes)
CARLA_DECLARE_NON_COPYABLE(ExternalNotes)


} extNotes; } extNotes;


@@ -316,7 +316,7 @@ struct CarlaPlugin::ProtectedData {
void recreateBuffers(uint32_t newChannels, uint32_t newFrames); void recreateBuffers(uint32_t newChannels, uint32_t newFrames);
#endif #endif


CARLA_DECLARE_NON_COPY_STRUCT(Latency)
CARLA_DECLARE_NON_COPYABLE(Latency)


} latency; } latency;


@@ -368,7 +368,7 @@ struct CarlaPlugin::ProtectedData {
CarlaMutex dataPendingMutex; CarlaMutex dataPendingMutex;
CarlaMutex poolMutex; CarlaMutex poolMutex;


CARLA_DECLARE_NON_COPY_CLASS(PostRtEvents)
CARLA_DECLARE_NON_COPYABLE(PostRtEvents)


} postRtEvents; } postRtEvents;


@@ -381,7 +381,7 @@ struct CarlaPlugin::ProtectedData {
void append(const PluginPostRtEvent& event) noexcept; void append(const PluginPostRtEvent& event) noexcept;
void clear() noexcept; void clear() noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(PostUiEvents)
CARLA_DECLARE_NON_COPYABLE(PostUiEvents)


} postUiEvents; } postUiEvents;


@@ -395,7 +395,7 @@ struct CarlaPlugin::ProtectedData {


PostProc() noexcept; PostProc() noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(PostProc)
CARLA_DECLARE_NON_COPYABLE(PostProc)


} postProc; } postProc;
#endif #endif
@@ -457,7 +457,7 @@ struct CarlaPlugin::ProtectedData {


#ifdef CARLA_PROPER_CPP11_SUPPORT #ifdef CARLA_PROPER_CPP11_SUPPORT
ProtectedData() = delete; ProtectedData() = delete;
CARLA_DECLARE_NON_COPY_STRUCT(ProtectedData);
CARLA_DECLARE_NON_COPYABLE(ProtectedData);
#endif #endif
CARLA_LEAK_DETECTOR(ProtectedData); CARLA_LEAK_DETECTOR(ProtectedData);
}; };


+ 141
- 126
source/backend/plugin/CarlaPluginJSFX.cpp View File

@@ -49,12 +49,19 @@ class CarlaPluginJSFX : public CarlaPlugin
public: public:
CarlaPluginJSFX(CarlaEngine* const engine, const uint id) noexcept CarlaPluginJSFX(CarlaEngine* const engine, const uint id) noexcept
: CarlaPlugin(engine, id), : CarlaPlugin(engine, id),
fEffect(nullptr),
fEffectState(nullptr),
fUnit(),
fChunkText(),
fTransportValues(),
fMapOfSliderToParameter(ysfx_max_sliders, -1) fMapOfSliderToParameter(ysfx_max_sliders, -1)
{ {
carla_debug("CarlaPluginJSFX::CarlaPluginJSFX(%p, %i)", engine, id); carla_debug("CarlaPluginJSFX::CarlaPluginJSFX(%p, %i)", engine, id);

carla_zeroStruct(fTransportValues);
} }


~CarlaPluginJSFX()
~CarlaPluginJSFX() noexcept override
{ {
carla_debug("CarlaPluginJSFX::~CarlaPluginJSFX()"); carla_debug("CarlaPluginJSFX::~CarlaPluginJSFX()");


@@ -71,6 +78,9 @@ public:
} }


clearBuffers(); clearBuffers();

ysfx_state_free(fEffectState);
ysfx_free(fEffect);
} }


// ------------------------------------------------------------------- // -------------------------------------------------------------------
@@ -85,15 +95,15 @@ public:
{ {
CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, CarlaPlugin::getCategory()); CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, CarlaPlugin::getCategory());


return CarlaJsfxCategories::getFromEffect(fEffect.get());
return CarlaJsfxCategories::getFromEffect(fEffect);
} }


uint32_t getLatencyInFrames() const noexcept override uint32_t getLatencyInFrames() const noexcept override
{ {
CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, 0); CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, 0);


ysfx_real sampleRate = ysfx_get_sample_rate(fEffect.get());
ysfx_real latencyInSeconds = ysfx_get_pdc_delay(fEffect.get());
ysfx_real sampleRate = ysfx_get_sample_rate(fEffect);
ysfx_real latencyInSeconds = ysfx_get_pdc_delay(fEffect);


//NOTE: `pdc_bot_ch` and `pdc_top_ch` channel range ignored //NOTE: `pdc_bot_ch` and `pdc_top_ch` channel range ignored


@@ -120,25 +130,24 @@ public:
{ {
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0);


int32_t rindex = pData->param.data[parameterId].rindex;
return ysfx_slider_get_enum_names(fEffect.get(), (uint32_t)rindex, nullptr, 0);;
const uint32_t rindex = static_cast<uint32_t>(pData->param.data[parameterId].rindex);
return ysfx_slider_get_enum_names(fEffect, rindex, nullptr, 0);;
} }


// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Information (current data) // Information (current data)


std::size_t getChunkData(void** dataPtr) noexcept override
std::size_t getChunkData(void** const dataPtr) noexcept override
{ {
CARLA_SAFE_ASSERT_RETURN(pData->options & PLUGIN_OPTION_USE_CHUNKS, 0); CARLA_SAFE_ASSERT_RETURN(pData->options & PLUGIN_OPTION_USE_CHUNKS, 0);
CARLA_SAFE_ASSERT_RETURN(dataPtr != nullptr, 0); CARLA_SAFE_ASSERT_RETURN(dataPtr != nullptr, 0);


ysfx_state_u state(ysfx_save_state(fEffect.get()));
CARLA_SAFE_ASSERT_RETURN(state, 0);

fChunkText = CarlaJsfxState::convertToString(*state);
ysfx_state_free(fEffectState);
fEffectState = ysfx_save_state(fEffect);
CARLA_SAFE_ASSERT_RETURN(fEffectState != nullptr, 0);


*dataPtr = (void*)fChunkText.toRawUTF8();
return (std::size_t)fChunkText.getNumBytesAsUTF8();
*dataPtr = fEffectState->data;
return fEffectState->data_size;
} }


// ------------------------------------------------------------------- // -------------------------------------------------------------------
@@ -165,8 +174,8 @@ public:
{ {
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0.0f); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0.0f);


int32_t rindex = pData->param.data[parameterId].rindex;
return ysfx_slider_get_value(fEffect.get(), (uint32_t)rindex);
const uint32_t rindex = static_cast<uint32_t>(pData->param.data[parameterId].rindex);
return static_cast<float>(ysfx_slider_get_value(fEffect, rindex));
} }


bool getParameterName(const uint32_t parameterId, char* const strBuf) const noexcept override bool getParameterName(const uint32_t parameterId, char* const strBuf) const noexcept override
@@ -174,35 +183,15 @@ public:
CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, false); CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, false);
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false);


int32_t rindex = pData->param.data[parameterId].rindex;
const char *name = ysfx_slider_get_name(fEffect.get(), (uint32_t)rindex);
std::snprintf(strBuf, STR_MAX, "%s", name);
return true;
}


bool getParameterText(const uint32_t parameterId, char* const strBuf) noexcept override
{
CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, false);
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false);

int32_t rindex = pData->param.data[parameterId].rindex;
float value = ysfx_slider_get_value(fEffect.get(), (uint32_t)rindex);
const uint32_t rindex = static_cast<uint32_t>(pData->param.data[parameterId].rindex);


int32_t enumIndex = -1;
if (ysfx_slider_is_enum(fEffect.get(), (uint32_t)rindex))
if (const char* const name = ysfx_slider_get_name(fEffect, rindex))
{ {
uint32_t enumCount = ysfx_slider_get_enum_names(fEffect.get(), (uint32_t)rindex, nullptr, 0);
if ((int32_t)value >= 0 && (uint32_t)value < enumCount)
enumIndex = (int32_t)value;
std::snprintf(strBuf, STR_MAX, "%s", name);
return true;
} }


if (enumIndex != -1)
std::snprintf(strBuf, STR_MAX, "%s", ysfx_slider_get_name(fEffect.get(), (uint32_t)enumIndex));
else
std::snprintf(strBuf, STR_MAX, "%.12g", value);

return true;
return false;
} }


float getParameterScalePointValue(const uint32_t parameterId, const uint32_t scalePointId) const noexcept override float getParameterScalePointValue(const uint32_t parameterId, const uint32_t scalePointId) const noexcept override
@@ -216,13 +205,18 @@ public:
{ {
CARLA_SAFE_ASSERT_RETURN(parameterId < getParameterCount(), false); CARLA_SAFE_ASSERT_RETURN(parameterId < getParameterCount(), false);


int32_t rindex = pData->param.data[parameterId].rindex;
const uint32_t rindex = static_cast<uint32_t>(pData->param.data[parameterId].rindex);


uint32_t enumCount = ysfx_slider_get_enum_names(fEffect.get(), (uint32_t)rindex, nullptr, 0);
const uint32_t enumCount = ysfx_slider_get_enum_names(fEffect, rindex, nullptr, 0);
CARLA_SAFE_ASSERT_RETURN(scalePointId < enumCount, false); CARLA_SAFE_ASSERT_RETURN(scalePointId < enumCount, false);


std::snprintf(strBuf, STR_MAX, "%s", ysfx_slider_get_enum_name(fEffect.get(), (uint32_t)rindex, scalePointId));
return true;
if (const char* const name = ysfx_slider_get_enum_name(fEffect, rindex, scalePointId))
{
std::snprintf(strBuf, STR_MAX, "%s", name);
return true;
}

return false;
} }


bool getLabel(char* const strBuf) const noexcept override bool getLabel(char* const strBuf) const noexcept override
@@ -239,32 +233,34 @@ public:
CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr,); CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr,);
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);


int32_t rindex = pData->param.data[parameterId].rindex;
ysfx_slider_set_value(fEffect.get(), rindex, value);
const uint32_t rindex = static_cast<uint32_t>(pData->param.data[parameterId].rindex);
ysfx_slider_set_value(fEffect, rindex, value);


CarlaPlugin::setParameterValue(parameterId, value, sendGui, sendOsc, sendCallback); CarlaPlugin::setParameterValue(parameterId, value, sendGui, sendOsc, sendCallback);
} }


void setParameterValueRT(const uint32_t parameterId, const float value, const bool sendCallbackLater) noexcept override
void setParameterValueRT(const uint32_t parameterId, const float value, const uint32_t frameOffset, const bool sendCallbackLater) noexcept override
{ {
CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr,); CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr,);
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);


int32_t rindex = pData->param.data[parameterId].rindex;
ysfx_slider_set_value(fEffect.get(), rindex, value);
const uint32_t rindex = static_cast<uint32_t>(pData->param.data[parameterId].rindex);
ysfx_slider_set_value(fEffect, rindex, value);


CarlaPlugin::setParameterValueRT(parameterId, value, sendCallbackLater);
CarlaPlugin::setParameterValueRT(parameterId, value, frameOffset, sendCallbackLater);
} }


void setChunkData(const void* data, std::size_t dataSize) override void setChunkData(const void* data, std::size_t dataSize) override
{ {
CARLA_SAFE_ASSERT_RETURN(pData->options & PLUGIN_OPTION_USE_CHUNKS,); CARLA_SAFE_ASSERT_RETURN(pData->options & PLUGIN_OPTION_USE_CHUNKS,);


water::String dataText(water::CharPointer_UTF8((const char*)data), dataSize);
ysfx_state_t state;
state.sliders = nullptr;
state.slider_count = 0;
state.data = static_cast<uint8_t*>(const_cast<void*>(data));
state.data_size = dataSize;


ysfx_state_u state(CarlaJsfxState::convertFromString(dataText));
CARLA_SAFE_ASSERT_RETURN(state,);
CARLA_SAFE_ASSERT_RETURN(ysfx_load_state(fEffect.get(), state.get()),);
CARLA_SAFE_ASSERT(ysfx_load_state(fEffect, &state));
} }


// ------------------------------------------------------------------- // -------------------------------------------------------------------
@@ -290,12 +286,12 @@ public:


// initialize the block size and sample rate // initialize the block size and sample rate
// loading the chunk can invoke @slider which makes computations based on these // loading the chunk can invoke @slider which makes computations based on these
ysfx_set_sample_rate(fEffect.get(), pData->engine->getSampleRate());
ysfx_set_block_size(fEffect.get(), (uint32_t)pData->engine->getBufferSize());
ysfx_init(fEffect.get());
ysfx_set_sample_rate(fEffect, pData->engine->getSampleRate());
ysfx_set_block_size(fEffect, (uint32_t)pData->engine->getBufferSize());
ysfx_init(fEffect);


const uint32_t aIns = ysfx_get_num_inputs(fEffect.get());
const uint32_t aOuts = ysfx_get_num_outputs(fEffect.get());
const uint32_t aIns = ysfx_get_num_inputs(fEffect);
const uint32_t aOuts = ysfx_get_num_outputs(fEffect);


// perhaps we obtained a latency value from @init // perhaps we obtained a latency value from @init
pData->client->setLatency(getLatencyInFrames()); pData->client->setLatency(getLatencyInFrames());
@@ -315,7 +311,7 @@ public:
uint32_t mapOfParameterToSlider[ysfx_max_sliders]; uint32_t mapOfParameterToSlider[ysfx_max_sliders];
for (uint32_t rindex = 0; rindex < ysfx_max_sliders; ++rindex) for (uint32_t rindex = 0; rindex < ysfx_max_sliders; ++rindex)
{ {
if (ysfx_slider_exists(fEffect.get(), rindex))
if (ysfx_slider_exists(fEffect, rindex))
{ {
mapOfParameterToSlider[params] = rindex; mapOfParameterToSlider[params] = rindex;
fMapOfSliderToParameter[rindex] = (int32_t)params; fMapOfSliderToParameter[rindex] = (int32_t)params;
@@ -332,7 +328,7 @@ public:
pData->param.createNew(params, false); pData->param.createNew(params, false);
} }


const uint portNameSize(pData->engine->getMaxPortNameSize());
const uint portNameSize = pData->engine->getMaxPortNameSize();
CarlaString portName; CarlaString portName;


// Audio Ins // Audio Ins
@@ -346,7 +342,7 @@ public:
portName += ":"; portName += ":";
} }


const char* const inputName = ysfx_get_input_name(fEffect.get(), j);
const char* const inputName = ysfx_get_input_name(fEffect, j);
if (inputName && inputName[0]) if (inputName && inputName[0])
{ {
portName += inputName; portName += inputName;
@@ -376,7 +372,7 @@ public:
portName += ":"; portName += ":";
} }


const char* const outputName = ysfx_get_input_name(fEffect.get(), j);
const char* const outputName = ysfx_get_input_name(fEffect, j);
if (outputName && outputName[0]) if (outputName && outputName[0])
{ {
portName += outputName; portName += outputName;
@@ -404,21 +400,24 @@ public:
pData->param.data[j].rindex = (int32_t)rindex; pData->param.data[j].rindex = (int32_t)rindex;


ysfx_slider_range_t range = {}; ysfx_slider_range_t range = {};
ysfx_slider_get_range(fEffect.get(), rindex, &range);
ysfx_slider_get_range(fEffect, rindex, &range);


float min = (float)range.min; float min = (float)range.min;
float max = (float)range.max; float max = (float)range.max;
float def = (float)range.def; float def = (float)range.def;
float step = (float)range.inc; float step = (float)range.inc;
float stepSmall;
float stepLarge;


// only use values as integer if we have a proper range // only use values as integer if we have a proper range
bool isEnum = ysfx_slider_is_enum(fEffect.get(), rindex) &&
min == 0.0f && max >= 0.0f &&
max + 1.0f == (float)ysfx_slider_get_enum_names(fEffect.get(), rindex, nullptr, 0);
const bool isEnum = ysfx_slider_is_enum(fEffect, rindex) &&
carla_isZero(min) &&
max >= 0.0f &&
carla_isEqual(max + 1.0f, static_cast<float>(ysfx_slider_get_enum_names(fEffect, rindex, nullptr, 0)));


// NOTE: in case of incomplete slider specification without <min,max,step>; // NOTE: in case of incomplete slider specification without <min,max,step>;
// these are usually output-only sliders. // these are usually output-only sliders.
if (min == max)
if (carla_isEqual(min, max))
{ {
// replace with a dummy range // replace with a dummy range
min = 0.0f; min = 0.0f;
@@ -433,30 +432,20 @@ public:
else if (def > max) else if (def > max)
def = max; def = max;


float stepSmall;
float stepLarge;
pData->param.data[j].hints |= PARAMETER_IS_ENABLED;
if (isEnum) if (isEnum)
{ {
step = 1.0f; step = 1.0f;
stepSmall = 1.0f; stepSmall = 1.0f;
stepLarge = 10.0f; stepLarge = 10.0f;
}
else
{
stepSmall = step/10.0f;
stepLarge = step*10.0f;
}

pData->param.data[j].hints |= PARAMETER_IS_ENABLED;

if (isEnum)
{
pData->param.data[j].hints |= PARAMETER_IS_INTEGER; pData->param.data[j].hints |= PARAMETER_IS_INTEGER;
pData->param.data[j].hints |= PARAMETER_USES_SCALEPOINTS; pData->param.data[j].hints |= PARAMETER_USES_SCALEPOINTS;
pData->param.data[j].hints |= PARAMETER_USES_CUSTOM_TEXT;
} }
else else
{ {
stepSmall = step/10.0f;
stepLarge = step*10.0f;
pData->param.data[j].hints |= PARAMETER_CAN_BE_CV_CONTROLLED; pData->param.data[j].hints |= PARAMETER_CAN_BE_CV_CONTROLLED;
} }


@@ -508,9 +497,9 @@ public:
{ {
CARLA_SAFE_ASSERT_RETURN(fEffect,); CARLA_SAFE_ASSERT_RETURN(fEffect,);


ysfx_set_sample_rate(fEffect.get(), pData->engine->getSampleRate());
ysfx_set_block_size(fEffect.get(), (uint32_t)pData->engine->getBufferSize());
ysfx_init(fEffect.get());
ysfx_set_sample_rate(fEffect, pData->engine->getSampleRate());
ysfx_set_block_size(fEffect, (uint32_t)pData->engine->getBufferSize());
ysfx_init(fEffect);


fTransportValues.tempo = 120; fTransportValues.tempo = 120;
fTransportValues.playback_state = ysfx_playback_paused; fTransportValues.playback_state = ysfx_playback_paused;
@@ -546,7 +535,7 @@ public:
fTransportValues.time_signature[1] = (uint32_t)bbt.beatType; fTransportValues.time_signature[1] = (uint32_t)bbt.beatType;
} }


ysfx_set_time_info(fEffect.get(), &fTransportValues);
ysfx_set_time_info(fEffect, &fTransportValues);


// -------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------
// Event Input and Processing // Event Input and Processing
@@ -573,7 +562,7 @@ public:
event.offset = 0; event.offset = 0;
event.size = 3; event.size = 3;
event.data = midiData; event.data = midiData;
ysfx_send_midi(fEffect.get(), &event);
ysfx_send_midi(fEffect, &event);
} }


pData->extNotes.data.clear(); pData->extNotes.data.clear();
@@ -595,17 +584,6 @@ public:
if (event.time >= frames) if (event.time >= frames)
continue; continue;


auto addInputEvent = [this]
(uint32_t offset, const uint8_t *data, uint32_t size)
{
ysfx_midi_event_t event;
event.bus = 0;
event.offset = offset;
event.size = size;
event.data = data;
ysfx_send_midi(fEffect.get(), &event);
};

switch (event.type) switch (event.type)
{ {
case kEngineEventTypeNull: case kEngineEventTypeNull:
@@ -631,7 +609,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
continue; continue;
} }


@@ -692,7 +670,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
} }


if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE) if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE)
@@ -702,7 +680,12 @@ public:
midiData[1] = uint8_t(ctrlEvent.param); midiData[1] = uint8_t(ctrlEvent.param);
midiData[2] = uint8_t(ctrlEvent.normalizedValue*127.0f); midiData[2] = uint8_t(ctrlEvent.normalizedValue*127.0f);


addInputEvent(event.time, midiData, 3);
ysfx_midi_event_t yevent;
yevent.bus = 0;
yevent.offset = event.time;
yevent.size = 3;
yevent.data = midiData;
ysfx_send_midi(fEffect, &yevent);
} }


#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH
@@ -719,11 +702,21 @@ public:
midiData[0] = uint8_t(MIDI_STATUS_CONTROL_CHANGE | (event.channel & MIDI_CHANNEL_BIT)); midiData[0] = uint8_t(MIDI_STATUS_CONTROL_CHANGE | (event.channel & MIDI_CHANNEL_BIT));
midiData[1] = MIDI_CONTROL_BANK_SELECT; midiData[1] = MIDI_CONTROL_BANK_SELECT;
midiData[2] = 0; midiData[2] = 0;
addInputEvent(event.time, midiData, 3);

ysfx_midi_event_t yevent;
yevent.bus = 0;
yevent.offset = event.time;
yevent.size = 3;
yevent.data = midiData;
ysfx_send_midi(fEffect, &yevent);


midiData[1] = MIDI_CONTROL_BANK_SELECT__LSB; midiData[1] = MIDI_CONTROL_BANK_SELECT__LSB;
midiData[2] = uint8_t(ctrlEvent.normalizedValue*127.0f); midiData[2] = uint8_t(ctrlEvent.normalizedValue*127.0f);
addInputEvent(event.time, midiData, 3);
yevent.bus = 0;
yevent.offset = event.time;
yevent.size = 3;
yevent.data = midiData;
ysfx_send_midi(fEffect, &yevent);
} }
break; break;


@@ -737,10 +730,15 @@ public:
} }
else if ((pData->options & PLUGIN_OPTION_SEND_PROGRAM_CHANGES) != 0) else if ((pData->options & PLUGIN_OPTION_SEND_PROGRAM_CHANGES) != 0)
{ {
uint8_t midiData[3];
uint8_t midiData[2];
midiData[0] = uint8_t(MIDI_STATUS_PROGRAM_CHANGE | (event.channel & MIDI_CHANNEL_BIT)); midiData[0] = uint8_t(MIDI_STATUS_PROGRAM_CHANGE | (event.channel & MIDI_CHANNEL_BIT));
midiData[1] = uint8_t(ctrlEvent.normalizedValue*127.0f); midiData[1] = uint8_t(ctrlEvent.normalizedValue*127.0f);
addInputEvent(event.time, midiData, 2);
ysfx_midi_event_t yevent;
yevent.bus = 0;
yevent.offset = event.time;
yevent.size = 2;
yevent.data = midiData;
ysfx_send_midi(fEffect, &yevent);
} }
break; break;


@@ -751,8 +749,12 @@ public:
midiData[0] = uint8_t(MIDI_STATUS_CONTROL_CHANGE | (event.channel & MIDI_CHANNEL_BIT)); midiData[0] = uint8_t(MIDI_STATUS_CONTROL_CHANGE | (event.channel & MIDI_CHANNEL_BIT));
midiData[1] = MIDI_CONTROL_ALL_SOUND_OFF; midiData[1] = MIDI_CONTROL_ALL_SOUND_OFF;
midiData[2] = 0; midiData[2] = 0;

addInputEvent(event.time, midiData, 3);
ysfx_midi_event_t yevent;
yevent.bus = 0;
yevent.offset = event.time;
yevent.size = 3;
yevent.data = midiData;
ysfx_send_midi(fEffect, &yevent);
} }
break; break;


@@ -772,7 +774,12 @@ public:
midiData[1] = MIDI_CONTROL_ALL_NOTES_OFF; midiData[1] = MIDI_CONTROL_ALL_NOTES_OFF;
midiData[2] = 0; midiData[2] = 0;


addInputEvent(event.time, midiData, 3);
ysfx_midi_event_t yevent;
yevent.bus = 0;
yevent.offset = event.time;
yevent.size = 3;
yevent.data = midiData;
ysfx_send_midi(fEffect, &yevent);
} }
break; break;
} // switch (ctrlEvent.type) } // switch (ctrlEvent.type)
@@ -806,7 +813,12 @@ public:
midiData2[0] = uint8_t(status | (event.channel & MIDI_CHANNEL_BIT)); midiData2[0] = uint8_t(status | (event.channel & MIDI_CHANNEL_BIT));
std::memcpy(midiData2+1, midiData+1, static_cast<std::size_t>(midiEvent.size-1)); std::memcpy(midiData2+1, midiData+1, static_cast<std::size_t>(midiEvent.size-1));


addInputEvent(event.time, midiData2, midiEvent.size);
ysfx_midi_event_t yevent;
yevent.bus = midiEvent.port;
yevent.offset = event.time;
yevent.size = midiEvent.size;
yevent.data = midiData;
ysfx_send_midi(fEffect, &yevent);


if (status == MIDI_STATUS_NOTE_ON) if (status == MIDI_STATUS_NOTE_ON)
{ {
@@ -827,9 +839,9 @@ public:
// -------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------
// Plugin processing // Plugin processing


const uint32_t numInputs = ysfx_get_num_inputs(fEffect.get());
const uint32_t numOutputs = ysfx_get_num_outputs(fEffect.get());
ysfx_process_float(fEffect.get(), audioIn, audioOut, numInputs, numOutputs, frames);
const uint32_t numInputs = ysfx_get_num_inputs(fEffect);
const uint32_t numOutputs = ysfx_get_num_outputs(fEffect);
ysfx_process_float(fEffect, audioIn, audioOut, numInputs, numOutputs, frames);


// End of Plugin processing (no events) // End of Plugin processing (no events)


@@ -840,7 +852,7 @@ public:
{ {
ysfx_midi_event_t event; ysfx_midi_event_t event;


while (ysfx_receive_midi(fEffect.get(), &event))
while (ysfx_receive_midi(fEffect, &event))
{ {
CARLA_SAFE_ASSERT_BREAK(event.offset < frames); CARLA_SAFE_ASSERT_BREAK(event.offset < frames);
CARLA_SAFE_ASSERT_BREAK(event.size > 0); CARLA_SAFE_ASSERT_BREAK(event.size > 0);
@@ -858,8 +870,8 @@ public:
// Control Output // Control Output


{ {
uint64_t changes = ysfx_fetch_slider_changes(fEffect.get());
uint64_t automations = ysfx_fetch_slider_automations(fEffect.get());
uint64_t changes = ysfx_fetch_slider_changes(fEffect);
uint64_t automations = ysfx_fetch_slider_automations(fEffect);


if ((changes|automations) != 0) if ((changes|automations) != 0)
{ {
@@ -875,8 +887,8 @@ public:
int32_t parameterIndex = fMapOfSliderToParameter[rindex]; int32_t parameterIndex = fMapOfSliderToParameter[rindex];
CARLA_SAFE_ASSERT_CONTINUE(parameterIndex != -1); CARLA_SAFE_ASSERT_CONTINUE(parameterIndex != -1);


float newValue = ysfx_slider_get_value(fEffect.get(), (uint32_t)parameterIndex);
setParameterValueRT(parameterIndex, newValue, true);
const float newValue = static_cast<float>(ysfx_slider_get_value(fEffect, (uint32_t)parameterIndex));
setParameterValueRT((uint32_t)parameterIndex, newValue, 0, true);
} }
} }
} }
@@ -944,7 +956,7 @@ public:
const File currentPath(splitPaths[i]); const File currentPath(splitPaths[i]);
const File currentFile = currentPath.getChildFile(CharPointer_UTF8(label)); const File currentFile = currentPath.getChildFile(CharPointer_UTF8(label));
const CarlaJsfxUnit currentUnit(currentPath, currentFile); const CarlaJsfxUnit currentUnit(currentPath, currentFile);
if (currentUnit.getFilePath().existsAsFile())
if (File(currentUnit.getFilePath()).existsAsFile())
fUnit = currentUnit; fUnit = currentUnit;
} }
} }
@@ -961,8 +973,8 @@ public:
ysfx_config_u config(ysfx_config_new()); ysfx_config_u config(ysfx_config_new());
CARLA_SAFE_ASSERT_RETURN(config != nullptr, false); CARLA_SAFE_ASSERT_RETURN(config != nullptr, false);


const water::String rootPath = fUnit.getRootPath().getFullPathName();
const water::String filePath = fUnit.getFilePath().getFullPathName();
const water::String rootPath = fUnit.getRootPath();
const water::String filePath = fUnit.getFilePath();


ysfx_register_builtin_audio_formats(config.get()); ysfx_register_builtin_audio_formats(config.get());
ysfx_set_import_root(config.get(), rootPath.toRawUTF8()); ysfx_set_import_root(config.get(), rootPath.toRawUTF8());
@@ -970,14 +982,14 @@ public:
ysfx_set_log_reporter(config.get(), &CarlaJsfxLogging::logAll); ysfx_set_log_reporter(config.get(), &CarlaJsfxLogging::logAll);
ysfx_set_user_data(config.get(), (intptr_t)this); ysfx_set_user_data(config.get(), (intptr_t)this);


fEffect.reset(ysfx_new(config.get()));
fEffect = ysfx_new(config.get());
CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, false); CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, false);


// --------------------------------------------------------------- // ---------------------------------------------------------------
// get info // get info


{ {
if (! ysfx_load_file(fEffect.get(), filePath.toRawUTF8(), 0))
if (! ysfx_load_file(fEffect, filePath.toRawUTF8(), 0))
{ {
pData->engine->setLastError("Failed to load JSFX"); pData->engine->setLastError("Failed to load JSFX");
return false; return false;
@@ -989,7 +1001,7 @@ public:
| ysfx_compile_no_gfx | ysfx_compile_no_gfx
; ;


if (! ysfx_compile(fEffect.get(), compileFlags))
if (! ysfx_compile(fEffect, compileFlags))
{ {
pData->engine->setLastError("Failed to compile JSFX"); pData->engine->setLastError("Failed to compile JSFX");
return false; return false;
@@ -1002,7 +1014,7 @@ public:
} }
else else
{ {
pData->name = carla_strdup(ysfx_get_name(fEffect.get()));
pData->name = carla_strdup(ysfx_get_name(fEffect));
} }


pData->filename = carla_strdup(filePath.toRawUTF8()); pData->filename = carla_strdup(filePath.toRawUTF8());
@@ -1045,11 +1057,14 @@ public:
} }


private: private:
ysfx_u fEffect = nullptr;
ysfx_t* fEffect;
ysfx_state_t* fEffectState;
CarlaJsfxUnit fUnit; CarlaJsfxUnit fUnit;
water::String fChunkText; water::String fChunkText;
ysfx_time_info_t fTransportValues = {};
ysfx_time_info_t fTransportValues;
std::vector<int32_t> fMapOfSliderToParameter; std::vector<int32_t> fMapOfSliderToParameter;

CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginJSFX)
}; };


// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------


+ 3
- 3
source/backend/plugin/CarlaPluginJack.cpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Plugin JACK * Carla Plugin JACK
* Copyright (C) 2016-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2016-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -497,7 +497,7 @@ private:
return true; return true;
} }


CARLA_DECLARE_NON_COPY_STRUCT(ProjectData)
CARLA_DECLARE_NON_COPYABLE(ProjectData)
} fProject; } fProject;
#endif #endif


@@ -1818,7 +1818,7 @@ private:
setupLabel(), setupLabel(),
chunk() {} chunk() {}


CARLA_DECLARE_NON_COPY_STRUCT(Info)
CARLA_DECLARE_NON_COPYABLE(Info)
} fInfo; } fInfo;


void handleProcessStopped() noexcept void handleProcessStopped() noexcept


+ 5
- 5
source/backend/plugin/CarlaPluginJuce.cpp View File

@@ -371,7 +371,7 @@ public:
CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback); CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback);
} }


void setParameterValueRT(const uint32_t parameterId, const float value, const bool sendCallbackLater) noexcept override
void setParameterValueRT(const uint32_t parameterId, const float value, const uint32_t frameOffset, const bool sendCallbackLater) noexcept override
{ {
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);
CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,); CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,);
@@ -385,7 +385,7 @@ public:
parameter->setValue(value); parameter->setValue(value);
} CARLA_SAFE_EXCEPTION("setValue(RT)"); } CARLA_SAFE_EXCEPTION("setValue(RT)");


CarlaPlugin::setParameterValueRT(parameterId, fixedValue, sendCallbackLater);
CarlaPlugin::setParameterValueRT(parameterId, fixedValue, frameOffset, sendCallbackLater);
} }


void setChunkData(const void* const data, const std::size_t dataSize) override void setChunkData(const void* const data, const std::size_t dataSize) override
@@ -1083,7 +1083,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
continue; continue;
} }


@@ -1144,7 +1144,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
} }


if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE) if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE)
@@ -1189,7 +1189,7 @@ public:
} }
else if ((pData->options & PLUGIN_OPTION_SEND_PROGRAM_CHANGES) != 0) else if ((pData->options & PLUGIN_OPTION_SEND_PROGRAM_CHANGES) != 0)
{ {
uint8_t midiData[3];
uint8_t midiData[2];
midiData[0] = uint8_t(MIDI_STATUS_PROGRAM_CHANGE | (event.channel & MIDI_CHANNEL_BIT)); midiData[0] = uint8_t(MIDI_STATUS_PROGRAM_CHANGE | (event.channel & MIDI_CHANNEL_BIT));
midiData[1] = uint8_t(ctrlEvent.normalizedValue*127.0f + 0.5f); midiData[1] = uint8_t(ctrlEvent.normalizedValue*127.0f + 0.5f);
fMidiBuffer.addEvent(midiData, 2, static_cast<int>(event.time)); fMidiBuffer.addEvent(midiData, 2, static_cast<int>(event.time));


+ 4
- 4
source/backend/plugin/CarlaPluginLADSPADSSI.cpp View File

@@ -732,7 +732,7 @@ public:
CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback); CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback);
} }


void setParameterValueRT(const uint32_t parameterId, const float value, const bool sendCallbackLater) noexcept override
void setParameterValueRT(const uint32_t parameterId, const float value, const uint32_t frameOffset, const bool sendCallbackLater) noexcept override
{ {
CARLA_SAFE_ASSERT_RETURN(fParamBuffers != nullptr,); CARLA_SAFE_ASSERT_RETURN(fParamBuffers != nullptr,);
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);
@@ -740,7 +740,7 @@ public:
const float fixedValue(pData->param.getFixedValue(parameterId, value)); const float fixedValue(pData->param.getFixedValue(parameterId, value));
fParamBuffers[parameterId] = fixedValue; fParamBuffers[parameterId] = fixedValue;


CarlaPlugin::setParameterValueRT(parameterId, fixedValue, sendCallbackLater);
CarlaPlugin::setParameterValueRT(parameterId, fixedValue, frameOffset, sendCallbackLater);
} }


void setCustomData(const char* const type, const char* const key, const char* const value, const bool sendGui) override void setCustomData(const char* const type, const char* const key, const char* const value, const bool sendGui) override
@@ -1657,7 +1657,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
continue; continue;
} }


@@ -1717,7 +1717,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
} }


if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE) if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE)


+ 10
- 10
source/backend/plugin/CarlaPluginLV2.cpp View File

@@ -263,7 +263,7 @@ struct Lv2EventData {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(Lv2EventData)
CARLA_DECLARE_NON_COPYABLE(Lv2EventData)
}; };


struct CarlaPluginLV2EventData { struct CarlaPluginLV2EventData {
@@ -334,7 +334,7 @@ struct CarlaPluginLV2EventData {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(CarlaPluginLV2EventData)
CARLA_DECLARE_NON_COPYABLE(CarlaPluginLV2EventData)
}; };


// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
@@ -482,7 +482,7 @@ struct CarlaPluginLV2Options {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(CarlaPluginLV2Options);
CARLA_DECLARE_NON_COPYABLE(CarlaPluginLV2Options);
}; };


// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
@@ -1549,14 +1549,14 @@ public:
CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback); CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback);
} }


void setParameterValueRT(const uint32_t parameterId, const float value, const bool sendCallbackLater) noexcept override
void setParameterValueRT(const uint32_t parameterId, const float value, const uint32_t frameOffset, const bool sendCallbackLater) noexcept override
{ {
CARLA_SAFE_ASSERT_RETURN(fParamBuffers != nullptr,); CARLA_SAFE_ASSERT_RETURN(fParamBuffers != nullptr,);
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);


const float fixedValue = setParamterValueCommon(parameterId, value); const float fixedValue = setParamterValueCommon(parameterId, value);


CarlaPlugin::setParameterValueRT(parameterId, fixedValue, sendCallbackLater);
CarlaPlugin::setParameterValueRT(parameterId, fixedValue, frameOffset, sendCallbackLater);
} }


void setCustomData(const char* const type, const char* const key, const char* const value, const bool sendGui) override void setCustomData(const char* const type, const char* const key, const char* const value, const bool sendGui) override
@@ -4018,7 +4018,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
continue; continue;
} }


@@ -4084,7 +4084,7 @@ public:
else else
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);


setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
} }


if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE) if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE)
@@ -6332,7 +6332,7 @@ public:
{ {
if (pData->param.data[i].rindex == rindex) if (pData->param.data[i].rindex == rindex)
{ {
setParameterValueRT(i, paramValue, true);
setParameterValueRT(i, paramValue, 0, true);
break; break;
} }
} }
@@ -7467,7 +7467,7 @@ private:
uiresize(nullptr), uiresize(nullptr),
uiprograms(nullptr) {} uiprograms(nullptr) {}


CARLA_DECLARE_NON_COPY_STRUCT(Extensions);
CARLA_DECLARE_NON_COPYABLE(Extensions);
} fExt; } fExt;


struct UI { struct UI {
@@ -7511,7 +7511,7 @@ private:
CARLA_SAFE_ASSERT(window == nullptr); CARLA_SAFE_ASSERT(window == nullptr);
} }


CARLA_DECLARE_NON_COPY_STRUCT(UI);
CARLA_DECLARE_NON_COPYABLE(UI);
} fUI; } fUI;


// ------------------------------------------------------------------- // -------------------------------------------------------------------


+ 7
- 7
source/backend/plugin/CarlaPluginNative.cpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Native Plugin * Carla Native Plugin
* Copyright (C) 2012-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -171,7 +171,7 @@ struct NativePluginMidiOutData {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(NativePluginMidiOutData)
CARLA_DECLARE_NON_COPYABLE(NativePluginMidiOutData)
}; };


struct NativePluginMidiInData : NativePluginMidiOutData { struct NativePluginMidiInData : NativePluginMidiOutData {
@@ -236,7 +236,7 @@ struct NativePluginMidiInData : NativePluginMidiOutData {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(NativePluginMidiInData)
CARLA_DECLARE_NON_COPYABLE(NativePluginMidiInData)
}; };


// ----------------------------------------------------- // -----------------------------------------------------
@@ -764,7 +764,7 @@ public:
CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback); CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback);
} }


void setParameterValueRT(const uint32_t parameterId, const float value, const bool sendCallbackLater) noexcept override
void setParameterValueRT(const uint32_t parameterId, const float value, const uint32_t frameOffset, const bool sendCallbackLater) noexcept override
{ {
CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,); CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,);
CARLA_SAFE_ASSERT_RETURN(fDescriptor->set_parameter_value != nullptr,); CARLA_SAFE_ASSERT_RETURN(fDescriptor->set_parameter_value != nullptr,);
@@ -779,7 +779,7 @@ public:
if (fHandle2 != nullptr) if (fHandle2 != nullptr)
fDescriptor->set_parameter_value(fHandle2, parameterId, fixedValue); fDescriptor->set_parameter_value(fHandle2, parameterId, fixedValue);


CarlaPlugin::setParameterValueRT(parameterId, fixedValue, sendCallbackLater);
CarlaPlugin::setParameterValueRT(parameterId, fixedValue, frameOffset, sendCallbackLater);
} }


void setCustomData(const char* const type, const char* const key, const char* const value, const bool sendGui) override void setCustomData(const char* const type, const char* const key, const char* const value, const bool sendGui) override
@@ -1990,7 +1990,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
continue; continue;
} }


@@ -2050,7 +2050,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
} }


if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE) if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE)


+ 1
- 1
source/backend/plugin/CarlaPluginSFZero.cpp View File

@@ -466,7 +466,7 @@ public:
continue; continue;


value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, eventTime, true);
} }


if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE) if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE)


+ 6
- 6
source/backend/plugin/CarlaPluginVST2.cpp View File

@@ -413,7 +413,7 @@ public:
CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback); CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback);
} }


void setParameterValueRT(const uint32_t parameterId, const float value, const bool sendCallbackLater) noexcept override
void setParameterValueRT(const uint32_t parameterId, const float value, const uint32_t frameOffset, const bool sendCallbackLater) noexcept override
{ {
CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr,); CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr,);
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);
@@ -421,7 +421,7 @@ public:
const float fixedValue(pData->param.getFixedValue(parameterId, value)); const float fixedValue(pData->param.getFixedValue(parameterId, value));
fEffect->setParameter(fEffect, static_cast<int32_t>(parameterId), fixedValue); fEffect->setParameter(fEffect, static_cast<int32_t>(parameterId), fixedValue);


CarlaPlugin::setParameterValueRT(parameterId, fixedValue, sendCallbackLater);
CarlaPlugin::setParameterValueRT(parameterId, fixedValue, frameOffset, sendCallbackLater);
} }


void setChunkData(const void* const data, const std::size_t dataSize) override void setChunkData(const void* const data, const std::size_t dataSize) override
@@ -1425,7 +1425,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
continue; continue;
} }


@@ -1486,7 +1486,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
} }


if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE) if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE)
@@ -2768,7 +2768,7 @@ private:
carla_zeroPointers(data, kPluginMaxMidiEvents*2); carla_zeroPointers(data, kPluginMaxMidiEvents*2);
} }


CARLA_DECLARE_NON_COPY_STRUCT(FixedVstEvents);
CARLA_DECLARE_NON_COPYABLE(FixedVstEvents);
} fEvents; } fEvents;


struct UI { struct UI {
@@ -2794,7 +2794,7 @@ private:
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(UI);
CARLA_DECLARE_NON_COPYABLE(UI);
} fUI; } fUI;


int fUnique2; int fUnique2;


+ 33
- 23
source/backend/plugin/CarlaPluginVST3.cpp View File

@@ -65,7 +65,7 @@ void strncpy_utf8(char* const dst, const int16_t* const src, const size_t length
if (src[i] >= 0x80) if (src[i] >= 0x80)
continue; continue;


dst[i] = src[i];
dst[i] = static_cast<char>(src[i]);
} }
dst[len] = 0; dst[len] = 0;
} }
@@ -300,7 +300,8 @@ public:
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0.0f); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0.0f);


const double normalized = v3_cpp_obj(fV3.controller)->get_parameter_normalised(fV3.controller, parameterId); const double normalized = v3_cpp_obj(fV3.controller)->get_parameter_normalised(fV3.controller, parameterId);
return v3_cpp_obj(fV3.controller)->normalised_parameter_to_plain(fV3.controller, parameterId, normalized);
return static_cast<float>(
v3_cpp_obj(fV3.controller)->normalised_parameter_to_plain(fV3.controller, parameterId, normalized));
} }


bool getLabel(char* const strBuf) const noexcept override bool getLabel(char* const strBuf) const noexcept override
@@ -332,7 +333,9 @@ public:
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false);


v3_param_info paramInfo = {}; v3_param_info paramInfo = {};
CARLA_SAFE_ASSERT_RETURN(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller, parameterId, &paramInfo) == V3_OK, false);
CARLA_SAFE_ASSERT_RETURN(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller,
static_cast<int32_t>(parameterId),
&paramInfo) == V3_OK, false);


strncpy_utf8(strBuf, paramInfo.title, STR_MAX); strncpy_utf8(strBuf, paramInfo.title, STR_MAX);
return true; return true;
@@ -363,7 +366,9 @@ public:
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false);


v3_param_info paramInfo = {}; v3_param_info paramInfo = {};
CARLA_SAFE_ASSERT_RETURN(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller, parameterId, &paramInfo) == V3_OK, false);
CARLA_SAFE_ASSERT_RETURN(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller,
static_cast<int32_t>(parameterId),
&paramInfo) == V3_OK, false);


strncpy_utf8(strBuf, paramInfo.units, STR_MAX); strncpy_utf8(strBuf, paramInfo.units, STR_MAX);
return true; return true;
@@ -393,7 +398,7 @@ public:
CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback); CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback);
} }


void setParameterValueRT(const uint32_t parameterId, const float value, const bool sendCallbackLater) noexcept override
void setParameterValueRT(const uint32_t parameterId, const float value, const uint32_t frameOffset, const bool sendCallbackLater) noexcept override
{ {
CARLA_SAFE_ASSERT_RETURN(fV3.controller != nullptr,); CARLA_SAFE_ASSERT_RETURN(fV3.controller != nullptr,);
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);
@@ -402,7 +407,7 @@ public:


// TODO append value to V3 changes queue list // TODO append value to V3 changes queue list


CarlaPlugin::setParameterValueRT(parameterId, fixedValue, sendCallbackLater);
CarlaPlugin::setParameterValueRT(parameterId, fixedValue, frameOffset, sendCallbackLater);
} }


// ------------------------------------------------------------------- // -------------------------------------------------------------------
@@ -473,7 +478,7 @@ public:
if (v3_cpp_obj(fV3.view)->attached(fV3.view, fUI.window->getPtr(), V3_VIEW_PLATFORM_TYPE_NATIVE) == V3_OK) if (v3_cpp_obj(fV3.view)->attached(fV3.view, fUI.window->getPtr(), V3_VIEW_PLATFORM_TYPE_NATIVE) == V3_OK)
{ {
v3_view_rect rect = {}; v3_view_rect rect = {};
if (v3_cpp_obj(fV3.view)->get_size(fV3.view, 0) == V3_OK)
if (v3_cpp_obj(fV3.view)->get_size(fV3.view, &rect) == V3_OK)
{ {
const int32_t width = rect.right - rect.left; const int32_t width = rect.right - rect.left;
const int32_t height = rect.bottom - rect.top; const int32_t height = rect.bottom - rect.top;
@@ -553,22 +558,24 @@ public:
{ {
v3_bus_info busInfo = {}; v3_bus_info busInfo = {};
CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(fV3.component)->get_bus_info(fV3.component, V3_AUDIO, V3_INPUT, j, &busInfo) == V3_OK); CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(fV3.component)->get_bus_info(fV3.component, V3_AUDIO, V3_INPUT, j, &busInfo) == V3_OK);
CARLA_SAFE_ASSERT_BREAK(busInfo.channel_count >= 0);


if (busInfo.flags & V3_IS_CONTROL_VOLTAGE) if (busInfo.flags & V3_IS_CONTROL_VOLTAGE)
cvIns += busInfo.channel_count;
cvIns += static_cast<uint32_t>(busInfo.channel_count);
else else
aIns += busInfo.channel_count;
aIns += static_cast<uint32_t>(busInfo.channel_count);
} }


for (int32_t j=0; j<numAudioInputBuses; ++j) for (int32_t j=0; j<numAudioInputBuses; ++j)
{ {
v3_bus_info busInfo = {}; v3_bus_info busInfo = {};
CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(fV3.component)->get_bus_info(fV3.component, V3_AUDIO, V3_OUTPUT, j, &busInfo) == V3_OK); CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(fV3.component)->get_bus_info(fV3.component, V3_AUDIO, V3_OUTPUT, j, &busInfo) == V3_OK);
CARLA_SAFE_ASSERT_BREAK(busInfo.channel_count >= 0);


if (busInfo.flags & V3_IS_CONTROL_VOLTAGE) if (busInfo.flags & V3_IS_CONTROL_VOLTAGE)
cvOuts += busInfo.channel_count;
cvOuts += static_cast<uint32_t>(busInfo.channel_count);
else else
aOuts += busInfo.channel_count;
aOuts += static_cast<uint32_t>(busInfo.channel_count);
} }


for (int32_t j=0; j<numParameters; ++j) for (int32_t j=0; j<numParameters; ++j)
@@ -729,16 +736,16 @@ public:
pData->param.data[j].rindex = ij; pData->param.data[j].rindex = ij;


v3_param_info paramInfo = {}; v3_param_info paramInfo = {};
CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller, j, &paramInfo) == V3_OK);
CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller, ij, &paramInfo) == V3_OK);


if (paramInfo.flags & (V3_PARAM_IS_BYPASS|V3_PARAM_IS_HIDDEN|V3_PARAM_PROGRAM_CHANGE)) if (paramInfo.flags & (V3_PARAM_IS_BYPASS|V3_PARAM_IS_HIDDEN|V3_PARAM_PROGRAM_CHANGE))
continue; continue;


float min, max, def, step, stepSmall, stepLarge; float min, max, def, step, stepSmall, stepLarge;


min = v3_cpp_obj(fV3.controller)->normalised_parameter_to_plain(fV3.controller, j, 0.0);
max = v3_cpp_obj(fV3.controller)->normalised_parameter_to_plain(fV3.controller, j, 1.0);
def = v3_cpp_obj(fV3.controller)->normalised_parameter_to_plain(fV3.controller, j, paramInfo.default_normalised_value);
min = static_cast<float>(v3_cpp_obj(fV3.controller)->normalised_parameter_to_plain(fV3.controller, j, 0.0));
max = static_cast<float>(v3_cpp_obj(fV3.controller)->normalised_parameter_to_plain(fV3.controller, j, 1.0));
def = static_cast<float>(v3_cpp_obj(fV3.controller)->normalised_parameter_to_plain(fV3.controller, j, paramInfo.default_normalised_value));


if (min >= max) if (min >= max)
max = min + 0.1f; max = min + 0.1f;
@@ -1121,7 +1128,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
continue; continue;
} }


@@ -1182,7 +1189,7 @@ public:


ctrlEvent.handled = true; ctrlEvent.handled = true;
value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue);
setParameterValueRT(k, value, true);
setParameterValueRT(k, value, event.time, true);
} }


if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE) if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_VALUE)
@@ -1618,7 +1625,7 @@ public:
bool init(const CarlaPluginPtr plugin, bool init(const CarlaPluginPtr plugin,
const char* const filename, const char* const filename,
const char* name, const char* name,
const char* const label,
const char* /*const label*/,
const uint options) const uint options)
{ {
CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr, false); CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr, false);
@@ -1871,7 +1878,7 @@ private:
v3_process_context fV3TimeContext; v3_process_context fV3TimeContext;


CarlaScopedPointer<carla_v3_host_application> fV3Application; CarlaScopedPointer<carla_v3_host_application> fV3Application;
inline v3_funknown** getHostContext() const noexcept { return (v3_funknown**)&fV3Application; }
inline v3_funknown** getHostContext() const noexcept { return (v3_funknown**)fV3Application.get(); }


// v3_class_info_2 is ABI compatible with v3_class_info // v3_class_info_2 is ABI compatible with v3_class_info
union ClassInfo { union ClassInfo {
@@ -1998,11 +2005,11 @@ private:
// if we cannot cast from component, try to create edit controller from factory // if we cannot cast from component, try to create edit controller from factory
if (controller == nullptr) if (controller == nullptr)
{ {
v3_tuid uid = {};
if (v3_cpp_obj(component)->get_controller_class_id(component, uid) == V3_OK)
v3_tuid cuid = {};
if (v3_cpp_obj(component)->get_controller_class_id(component, cuid) == V3_OK)
{ {
instance = nullptr; instance = nullptr;
if (v3_cpp_obj(factory1)->create_instance(factory1, uid, v3_edit_controller_iid, &instance) == V3_OK && instance != nullptr)
if (v3_cpp_obj(factory1)->create_instance(factory1, cuid, v3_edit_controller_iid, &instance) == V3_OK && instance != nullptr)
controller = static_cast<v3_edit_controller**>(instance); controller = static_cast<v3_edit_controller**>(instance);
} }


@@ -2087,6 +2094,7 @@ private:
return false; return false;
} }


CARLA_DECLARE_NON_COPYABLE(Pointers)
} fV3; } fV3;


struct UI { struct UI {
@@ -2112,8 +2120,10 @@ private:
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(UI);
CARLA_DECLARE_NON_COPYABLE(UI)
} fUI; } fUI;

CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginVST3)
}; };


// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------


+ 10
- 8
source/backend/utils/CachedPlugins.cpp View File

@@ -99,11 +99,11 @@ static void findSFZs(const char* const sfzPaths)
} }
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------


static water::Array<CB::CarlaJsfxUnit> gJSFXs;
static std::vector<CB::CarlaJsfxUnit> gJSFXs;


static void findJSFXs(const char* const jsfxPaths) static void findJSFXs(const char* const jsfxPaths)
{ {
gJSFXs.clearQuick();
gJSFXs.clear();


CARLA_SAFE_ASSERT_RETURN(jsfxPaths != nullptr,); CARLA_SAFE_ASSERT_RETURN(jsfxPaths != nullptr,);


@@ -119,12 +119,14 @@ static void findJSFXs(const char* const jsfxPaths)


if (path.findChildFiles(results, water::File::findFiles|water::File::ignoreHiddenFiles, true, "*") > 0) if (path.findChildFiles(results, water::File::findFiles|water::File::ignoreHiddenFiles, true, "*") > 0)
{ {
for (std::vector<water::File>::iterator it=results.begin(), end=results.end(); it != end; ++it)
gJSFXs.reserve(gJSFXs.size() + results.size());

for (std::vector<water::File>::iterator it2=results.begin(), end2=results.end(); it2 != end2; ++it2)
{ {
const water::File& file(*it);
const water::File& file(*it2);
const water::String fileExt = file.getFileExtension(); const water::String fileExt = file.getFileExtension();
if (fileExt.isEmpty() || fileExt.equalsIgnoreCase(".jsfx")) if (fileExt.isEmpty() || fileExt.equalsIgnoreCase(".jsfx"))
gJSFXs.add(CB::CarlaJsfxUnit(path, file));
gJSFXs.push_back(CB::CarlaJsfxUnit(path, file));
} }
} }
} }
@@ -669,8 +671,8 @@ static const CarlaCachedPluginInfo* get_cached_plugin_jsfx(const CB::CarlaJsfxUn


ysfx_config_u config(ysfx_config_new()); ysfx_config_u config(ysfx_config_new());


const water::String rootPath = unit.getRootPath().getFullPathName();
const water::String filePath = unit.getFilePath().getFullPathName();
const water::String rootPath = unit.getRootPath();
const water::String filePath = unit.getFilePath();


ysfx_register_builtin_audio_formats(config.get()); ysfx_register_builtin_audio_formats(config.get());
ysfx_set_import_root(config.get(), rootPath.toRawUTF8()); ysfx_set_import_root(config.get(), rootPath.toRawUTF8());
@@ -821,7 +823,7 @@ const CarlaCachedPluginInfo* carla_get_cached_plugin_info(CB::PluginType ptype,


case CB::PLUGIN_JSFX: { case CB::PLUGIN_JSFX: {
CARLA_SAFE_ASSERT_BREAK(index < static_cast<uint>(gJSFXs.size())); CARLA_SAFE_ASSERT_BREAK(index < static_cast<uint>(gJSFXs.size()));
return get_cached_plugin_jsfx(gJSFXs.getUnchecked(static_cast<int>(index)));
return get_cached_plugin_jsfx(gJSFXs[index]);
} }


default: default:


+ 3
- 3
source/discovery/carla-discovery.cpp View File

@@ -1523,7 +1523,7 @@ static void do_vst3_check(lib_t& libHandle, const char* const filename, const bo
#endif #endif


carla_v3_host_application hostApplication; carla_v3_host_application hostApplication;
carla_v3_host_application* const hostApplicationPtr = &hostApplication;
carla_v3_host_application* hostApplicationPtr = &hostApplication;
v3_funknown** const hostContext = (v3_funknown**)&hostApplicationPtr; v3_funknown** const hostContext = (v3_funknown**)&hostApplicationPtr;


// fetch initial factory // fetch initial factory
@@ -1737,8 +1737,8 @@ static void do_vst3_check(lib_t& libHandle, const char* const filename, const bo
CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(component)->set_active(component, true) == V3_OK); CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(component)->set_active(component, true) == V3_OK);
CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(processor)->set_processing(processor, true) == V3_OK); CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(processor)->set_processing(processor, true) == V3_OK);


float* bufferAudioIn[std::max(1, audioIns + cvIns)];
float* bufferAudioOut[std::max(1, audioOuts + cvOuts)];
float* bufferAudioIn[(uint)std::max(1, audioIns + cvIns)];
float* bufferAudioOut[(uint)std::max(1, audioOuts + cvOuts)];


if (audioIns + cvIns == 0) if (audioIns + cvIns == 0)
{ {


+ 3
- 14
source/includes/CarlaDefines.h View File

@@ -217,16 +217,16 @@
#define CARLA_SAFE_EXCEPTION_CONTINUE(msg) CARLA_CATCH_UNWIND catch(...) { carla_safe_exception(msg, __FILE__, __LINE__); continue; } #define CARLA_SAFE_EXCEPTION_CONTINUE(msg) CARLA_CATCH_UNWIND catch(...) { carla_safe_exception(msg, __FILE__, __LINE__); continue; }
#define CARLA_SAFE_EXCEPTION_RETURN(msg, ret) CARLA_CATCH_UNWIND catch(...) { carla_safe_exception(msg, __FILE__, __LINE__); return ret; } #define CARLA_SAFE_EXCEPTION_RETURN(msg, ret) CARLA_CATCH_UNWIND catch(...) { carla_safe_exception(msg, __FILE__, __LINE__); return ret; }


/* Define CARLA_DECLARE_NON_COPY_CLASS */
/* Define CARLA_DECLARE_NON_COPYABLE */
#ifdef CARLA_PROPER_CPP11_SUPPORT #ifdef CARLA_PROPER_CPP11_SUPPORT
# define CARLA_DECLARE_NON_COPY_CLASS(ClassName) \
# define CARLA_DECLARE_NON_COPYABLE(ClassName) \
private: \ private: \
ClassName(ClassName&) = delete; \ ClassName(ClassName&) = delete; \
ClassName(const ClassName&) = delete; \ ClassName(const ClassName&) = delete; \
ClassName& operator=(ClassName&) = delete; \ ClassName& operator=(ClassName&) = delete; \
ClassName& operator=(const ClassName&) = delete; ClassName& operator=(const ClassName&) = delete;
#else #else
# define CARLA_DECLARE_NON_COPY_CLASS(ClassName) \
# define CARLA_DECLARE_NON_COPYABLE(ClassName) \
private: \ private: \
ClassName(ClassName&); \ ClassName(ClassName&); \
ClassName(const ClassName&); \ ClassName(const ClassName&); \
@@ -234,17 +234,6 @@ private: \
ClassName& operator=(const ClassName&); ClassName& operator=(const ClassName&);
#endif #endif


/* Define CARLA_DECLARE_NON_COPY_STRUCT */
#ifdef CARLA_PROPER_CPP11_SUPPORT
# define CARLA_DECLARE_NON_COPY_STRUCT(StructName) \
StructName(StructName&) = delete; \
StructName(const StructName&) = delete; \
StructName& operator=(StructName&) = delete; \
StructName& operator=(const StructName&) = delete;
#else
# define CARLA_DECLARE_NON_COPY_STRUCT(StructName)
#endif

/* Define CARLA_PREVENT_HEAP_ALLOCATION */ /* Define CARLA_PREVENT_HEAP_ALLOCATION */
#ifdef CARLA_PROPER_CPP11_SUPPORT #ifdef CARLA_PROPER_CPP11_SUPPORT
# define CARLA_PREVENT_HEAP_ALLOCATION \ # define CARLA_PREVENT_HEAP_ALLOCATION \


+ 3
- 3
source/includes/CarlaNativePrograms.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Native Plugin API (C++) * Carla Native Plugin API (C++)
* Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -65,9 +65,9 @@ struct NativePluginPresetManager {
{ {
std::vector<File> results; std::vector<File> results;


if (const int count = File(*it).findChildFiles(results, File::findFiles|File::ignoreHiddenFiles, true, wildcard))
if (const uint count = File(*it).findChildFiles(results, File::findFiles|File::ignoreHiddenFiles, true, wildcard))
{ {
for (int i=0; i<count; ++i)
for (uint i=0; i<count; ++i)
filenames.add(results[i].getFullPathName()); filenames.add(results[i].getFullPathName());
} }
} }


+ 4
- 4
source/includes/ladspa_rdf.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Custom types to store LADSPA-RDF information * Custom types to store LADSPA-RDF information
* Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -129,7 +129,7 @@ struct LADSPA_RDF_ScalePoint {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LADSPA_RDF_ScalePoint)
CARLA_DECLARE_NON_COPYABLE(LADSPA_RDF_ScalePoint)
}; };


// Port // Port
@@ -166,7 +166,7 @@ struct LADSPA_RDF_Port {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LADSPA_RDF_Port)
CARLA_DECLARE_NON_COPYABLE(LADSPA_RDF_Port)
}; };


// Plugin Descriptor // Plugin Descriptor
@@ -206,7 +206,7 @@ struct LADSPA_RDF_Descriptor {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LADSPA_RDF_Descriptor)
CARLA_DECLARE_NON_COPYABLE(LADSPA_RDF_Descriptor)
}; };


#endif // LADSPA_RDF_HPP_INCLUDED #endif // LADSPA_RDF_HPP_INCLUDED

+ 11
- 11
source/includes/lv2_rdf.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Custom types to store LV2 information * Custom types to store LV2 information
* Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -378,7 +378,7 @@ struct LV2_RDF_PortUnit {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_PortUnit)
CARLA_DECLARE_NON_COPYABLE(LV2_RDF_PortUnit)
}; };


// Port Scale Point // Port Scale Point
@@ -399,7 +399,7 @@ struct LV2_RDF_PortScalePoint {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_PortScalePoint)
CARLA_DECLARE_NON_COPYABLE(LV2_RDF_PortScalePoint)
}; };


// Port // Port
@@ -465,7 +465,7 @@ struct LV2_RDF_Port {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_Port)
CARLA_DECLARE_NON_COPYABLE(LV2_RDF_Port)
}; };


// Port // Port
@@ -493,7 +493,7 @@ struct LV2_RDF_PortGroup {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_PortGroup)
CARLA_DECLARE_NON_COPYABLE(LV2_RDF_PortGroup)
}; };


// Parameter // Parameter
@@ -568,7 +568,7 @@ struct LV2_RDF_Parameter {
other.Unit.Symbol = nullptr; other.Unit.Symbol = nullptr;
} }


CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_Parameter)
CARLA_DECLARE_NON_COPYABLE(LV2_RDF_Parameter)
}; };


// Preset // Preset
@@ -594,7 +594,7 @@ struct LV2_RDF_Preset {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_Preset)
CARLA_DECLARE_NON_COPYABLE(LV2_RDF_Preset)
}; };


// Feature // Feature
@@ -615,7 +615,7 @@ struct LV2_RDF_Feature {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_Feature)
CARLA_DECLARE_NON_COPYABLE(LV2_RDF_Feature)
}; };


// Port Notification // Port Notification
@@ -638,7 +638,7 @@ struct LV2_RDF_UI_PortNotification {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_UI_PortNotification)
CARLA_DECLARE_NON_COPYABLE(LV2_RDF_UI_PortNotification)
}; };


// UI // UI
@@ -711,7 +711,7 @@ struct LV2_RDF_UI {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_UI)
CARLA_DECLARE_NON_COPYABLE(LV2_RDF_UI)
}; };


// Plugin Descriptor // Plugin Descriptor
@@ -849,7 +849,7 @@ struct LV2_RDF_Descriptor {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_Descriptor)
CARLA_DECLARE_NON_COPYABLE(LV2_RDF_Descriptor)
}; };


#endif // LV2_RDF_HPP_INCLUDED #endif // LV2_RDF_HPP_INCLUDED

+ 1
- 1
source/interposer/interposer-jack-x11.cpp View File

@@ -59,7 +59,7 @@ struct ScopedLibOpen {
return slo; return slo;
} }


CARLA_DECLARE_NON_COPY_STRUCT(ScopedLibOpen);
CARLA_DECLARE_NON_COPYABLE(ScopedLibOpen);
}; };


// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------


+ 3
- 3
source/jackbridge/JackBridge1.cpp View File

@@ -1,6 +1,6 @@
/* /*
* JackBridge (Part 1, JACK functions) * JackBridge (Part 1, JACK functions)
* Copyright (C) 2013-2015 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
* *
* Permission to use, copy, modify, and/or distribute this software for any purpose with * Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this * or without fee is hereby granted, provided that the above copyright notice and this
@@ -554,7 +554,7 @@ struct JackBridge {
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(JackBridge);
CARLA_DECLARE_NON_COPYABLE(JackBridge);
}; };


// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@@ -773,7 +773,7 @@ struct WineBridge {
return getInstance().prop_change_cb(subject, key, change, arg); return getInstance().prop_change_cb(subject, key, change, arg);
} }


CARLA_DECLARE_NON_COPY_STRUCT(WineBridge);
CARLA_DECLARE_NON_COPYABLE(WineBridge);
}; };


#endif // __WINE__ && ! JACKBRIDGE_DIRECT #endif // __WINE__ && ! JACKBRIDGE_DIRECT


+ 1
- 1
source/jackbridge/JackBridgeExport.cpp View File

@@ -74,7 +74,7 @@ private:
jackbridge_exported_function_type func; jackbridge_exported_function_type func;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(JackBridgeExported);
CARLA_DECLARE_NON_COPYABLE(JackBridgeExported);
}; };


// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 2
- 2
source/libjack/libjack.cpp View File

@@ -63,7 +63,7 @@ protected:
private: private:
Callback* const fCallback; Callback* const fCallback;


CARLA_DECLARE_NON_COPY_CLASS(CarlaJackRealtimeThread)
CARLA_DECLARE_NON_COPYABLE(CarlaJackRealtimeThread)
}; };


// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------
@@ -90,7 +90,7 @@ protected:
private: private:
Callback* const fCallback; Callback* const fCallback;


CARLA_DECLARE_NON_COPY_CLASS(CarlaJackNonRealtimeThread)
CARLA_DECLARE_NON_COPYABLE(CarlaJackNonRealtimeThread)
}; };


// --------------------------------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------------------------------


+ 6
- 6
source/libjack/libjack.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla JACK API for external applications * Carla JACK API for external applications
* Copyright (C) 2016-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2016-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -89,7 +89,7 @@ struct JackMidiPortBufferOnStack : JackMidiPortBufferBase {
isDummy = false; isDummy = false;
} }


CARLA_DECLARE_NON_COPY_STRUCT(JackMidiPortBufferOnStack)
CARLA_DECLARE_NON_COPYABLE(JackMidiPortBufferOnStack)
}; };


struct JackMidiPortBufferDummy : JackMidiPortBufferBase { struct JackMidiPortBufferDummy : JackMidiPortBufferBase {
@@ -99,7 +99,7 @@ struct JackMidiPortBufferDummy : JackMidiPortBufferBase {
isDummy = true; isDummy = true;
} }


CARLA_DECLARE_NON_COPY_STRUCT(JackMidiPortBufferDummy)
CARLA_DECLARE_NON_COPYABLE(JackMidiPortBufferDummy)
}; };


struct JackPortState { struct JackPortState {
@@ -174,7 +174,7 @@ struct JackPortState {
fullname = nullptr; fullname = nullptr;
} }


CARLA_DECLARE_NON_COPY_STRUCT(JackPortState)
CARLA_DECLARE_NON_COPYABLE(JackPortState)
}; };


struct JackClientState { struct JackClientState {
@@ -289,7 +289,7 @@ struct JackClientState {
portNameMapping.clear(); portNameMapping.clear();
} }


CARLA_DECLARE_NON_COPY_STRUCT(JackClientState)
CARLA_DECLARE_NON_COPYABLE(JackClientState)
}; };


struct JackServerState { struct JackServerState {
@@ -325,7 +325,7 @@ struct JackServerState {
carla_zeroStruct(position); carla_zeroStruct(position);
} }


CARLA_DECLARE_NON_COPY_STRUCT(JackServerState)
CARLA_DECLARE_NON_COPYABLE(JackServerState)
}; };


CARLA_BACKEND_END_NAMESPACE CARLA_BACKEND_END_NAMESPACE


+ 1
- 1
source/modules/lilv/lilv-0.24.0/lilv/lilvmm.hpp View File

@@ -356,7 +356,7 @@ struct World {


LilvWorld* me; LilvWorld* me;


CARLA_DECLARE_NON_COPY_STRUCT(World)
CARLA_DECLARE_NON_COPYABLE(World)
}; };


} /* namespace Lilv */ } /* namespace Lilv */


+ 2
- 2
source/modules/water/buffers/AudioSampleBuffer.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017-2018 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -738,7 +738,7 @@ private:
return true; return true;
} }
// CARLA_DECLARE_NON_COPY_CLASS(AudioSampleBuffer)
// CARLA_DECLARE_NON_COPYABLE(AudioSampleBuffer)
}; };
} }


+ 2
- 3
source/modules/water/containers/ArrayAllocationBase.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017-2019 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -134,8 +134,7 @@ public:
HeapBlock<ElementType> elements; HeapBlock<ElementType> elements;
size_t numAllocated; size_t numAllocated;
private:
CARLA_DECLARE_NON_COPY_CLASS (ArrayAllocationBase)
CARLA_DECLARE_NON_COPYABLE (ArrayAllocationBase)
}; };
} }


+ 2
- 2
source/modules/water/containers/HashMap.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2018 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2018-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -331,7 +331,7 @@ private:
ValueType value; ValueType value;
HashEntry* nextEntry; HashEntry* nextEntry;
CARLA_DECLARE_NON_COPY_CLASS (HashEntry)
CARLA_DECLARE_NON_COPYABLE (HashEntry)
}; };
public: public:


+ 3
- 3
source/modules/water/containers/LinkedListPointer.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -340,14 +340,14 @@ public:
private: private:
LinkedListPointer* endOfList; LinkedListPointer* endOfList;
CARLA_DECLARE_NON_COPY_CLASS (Appender)
CARLA_DECLARE_NON_COPYABLE (Appender)
}; };
private: private:
//============================================================================== //==============================================================================
ObjectType* item; ObjectType* item;
CARLA_DECLARE_NON_COPY_CLASS (LinkedListPointer)
CARLA_DECLARE_NON_COPYABLE (LinkedListPointer)
}; };
} }


+ 2
- 2
source/modules/water/containers/OwnedArray.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -807,7 +807,7 @@ private:
delete data.elements [--numUsed]; delete data.elements [--numUsed];
} }
CARLA_DECLARE_NON_COPY_CLASS (OwnedArray)
CARLA_DECLARE_NON_COPYABLE (OwnedArray)
}; };
} }


+ 3
- 3
source/modules/water/files/DirectoryIterator.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -136,7 +136,7 @@ private:
friend class DirectoryIterator; friend class DirectoryIterator;
CarlaScopedPointer<Pimpl> pimpl; CarlaScopedPointer<Pimpl> pimpl;
CARLA_DECLARE_NON_COPY_CLASS (NativeIterator)
CARLA_DECLARE_NON_COPYABLE (NativeIterator)
}; };
StringArray wildCards; StringArray wildCards;
@@ -153,7 +153,7 @@ private:
static StringArray parseWildcards (const String& pattern); static StringArray parseWildcards (const String& pattern);
static bool fileMatches (const StringArray& wildCards, const String& filename); static bool fileMatches (const StringArray& wildCards, const String& filename);
CARLA_DECLARE_NON_COPY_CLASS (DirectoryIterator)
CARLA_DECLARE_NON_COPYABLE (DirectoryIterator)
}; };
} }


+ 11
- 11
source/modules/water/files/File.cpp View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017-2018 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -556,12 +556,12 @@ void File::readLines (StringArray& destLines) const
} }
//============================================================================== //==============================================================================
int File::findChildFiles (std::vector<File>& results,
const int whatToLookFor,
const bool searchRecursively,
const String& wildCardPattern) const
uint File::findChildFiles (std::vector<File>& results,
const int whatToLookFor,
const bool searchRecursively,
const String& wildCardPattern) const
{ {
int total = 0;
uint total = 0;
for (DirectoryIterator di (*this, searchRecursively, wildCardPattern, whatToLookFor); di.next();) for (DirectoryIterator di (*this, searchRecursively, wildCardPattern, whatToLookFor); di.next();)
{ {
@@ -572,9 +572,9 @@ int File::findChildFiles (std::vector<File>& results,
return total; return total;
} }
int File::getNumberOfChildFiles (const int whatToLookFor, const String& wildCardPattern) const
uint File::getNumberOfChildFiles (const int whatToLookFor, const String& wildCardPattern) const
{ {
int total = 0;
uint total = 0;
for (DirectoryIterator di (*this, false, wildCardPattern, whatToLookFor); di.next();) for (DirectoryIterator di (*this, false, wildCardPattern, whatToLookFor); di.next();)
++total; ++total;
@@ -1216,7 +1216,7 @@ private:
const String directoryWithWildCard; const String directoryWithWildCard;
HANDLE handle; HANDLE handle;
CARLA_DECLARE_NON_COPY_CLASS (Pimpl)
CARLA_DECLARE_NON_COPYABLE (Pimpl)
}; };
#else #else
//===================================================================================================================== //=====================================================================================================================
@@ -1542,7 +1542,7 @@ private:
String parentDir, wildCard; String parentDir, wildCard;
NSDirectoryEnumerator* enumerator; NSDirectoryEnumerator* enumerator;
CARLA_DECLARE_NON_COPY_CLASS (Pimpl)
CARLA_DECLARE_NON_COPYABLE (Pimpl)
}; };
#else #else
static String getLinkedFile (const String& file) static String getLinkedFile (const String& file)
@@ -1689,7 +1689,7 @@ private:
String parentDir, wildCard; String parentDir, wildCard;
DIR* dir; DIR* dir;
CARLA_DECLARE_NON_COPY_CLASS (Pimpl)
CARLA_DECLARE_NON_COPYABLE (Pimpl)
}; };
#endif #endif
#endif #endif


+ 6
- 6
source/modules/water/files/File.h View File

@@ -494,10 +494,10 @@ public:
@see getNumberOfChildFiles, DirectoryIterator @see getNumberOfChildFiles, DirectoryIterator
*/ */
int findChildFiles (std::vector<File>& results,
int whatToLookFor,
bool searchRecursively,
const String& wildCardPattern = "*") const;
uint findChildFiles (std::vector<File>& results,
int whatToLookFor,
bool searchRecursively,
const String& wildCardPattern = "*") const;
/** Searches inside a directory and counts how many files match a wildcard pattern. /** Searches inside a directory and counts how many files match a wildcard pattern.
@@ -515,8 +515,8 @@ public:
@returns the number of matches found @returns the number of matches found
@see findChildFiles, DirectoryIterator @see findChildFiles, DirectoryIterator
*/ */
int getNumberOfChildFiles (int whatToLookFor,
const String& wildCardPattern = "*") const;
uint getNumberOfChildFiles (int whatToLookFor,
const String& wildCardPattern = "*") const;
/** Returns true if this file is a directory that contains one or more subdirectories. /** Returns true if this file is a directory that contains one or more subdirectories.
@see isDirectory, findChildFiles @see isDirectory, findChildFiles


+ 2
- 2
source/modules/water/files/FileInputStream.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -90,7 +90,7 @@ private:
void openHandle(); void openHandle();
size_t readInternal (void*, size_t); size_t readInternal (void*, size_t);
CARLA_DECLARE_NON_COPY_CLASS (FileInputStream)
CARLA_DECLARE_NON_COPYABLE (FileInputStream)
}; };
} }


+ 2
- 2
source/modules/water/files/FileOutputStream.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -116,7 +116,7 @@ private:
int64 setPositionInternal (int64); int64 setPositionInternal (int64);
ssize_t writeInternal (const void*, size_t); ssize_t writeInternal (const void*, size_t);
CARLA_DECLARE_NON_COPY_CLASS (FileOutputStream)
CARLA_DECLARE_NON_COPYABLE (FileOutputStream)
}; };
} }


+ 2
- 2
source/modules/water/files/TemporaryFile.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -164,7 +164,7 @@ private:
//============================================================================== //==============================================================================
const File temporaryFile, targetFile; const File temporaryFile, targetFile;
CARLA_DECLARE_NON_COPY_CLASS (TemporaryFile)
CARLA_DECLARE_NON_COPYABLE (TemporaryFile)
}; };
} }


+ 2
- 2
source/modules/water/memory/ByteOrder.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -143,7 +143,7 @@ public:
private: private:
ByteOrder() WATER_DELETED_FUNCTION; ByteOrder() WATER_DELETED_FUNCTION;
CARLA_DECLARE_NON_COPY_CLASS (ByteOrder)
CARLA_DECLARE_NON_COPYABLE (ByteOrder)
}; };


+ 2
- 2
source/modules/water/memory/HeapBlock.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017-2018 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -254,7 +254,7 @@ private:
//============================================================================== //==============================================================================
ElementType* data; ElementType* data;
CARLA_DECLARE_NON_COPY_CLASS(HeapBlock)
CARLA_DECLARE_NON_COPYABLE(HeapBlock)
}; };
} }


+ 3
- 3
source/modules/water/memory/ReferenceCountedObject.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -126,7 +126,7 @@ private:
//============================================================================== //==============================================================================
Atomic<int> refCount; Atomic<int> refCount;
CARLA_DECLARE_NON_COPY_CLASS (ReferenceCountedObject)
CARLA_DECLARE_NON_COPYABLE (ReferenceCountedObject)
}; };
@@ -196,7 +196,7 @@ private:
//============================================================================== //==============================================================================
int refCount; int refCount;
CARLA_DECLARE_NON_COPY_CLASS (SingleThreadedReferenceCountedObject)
CARLA_DECLARE_NON_COPYABLE (SingleThreadedReferenceCountedObject)
}; };


+ 2
- 2
source/modules/water/midi/MidiBuffer.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -222,7 +222,7 @@ public:
const MidiBuffer& buffer; const MidiBuffer& buffer;
const uint8* data; const uint8* data;
CARLA_DECLARE_NON_COPY_CLASS (Iterator)
CARLA_DECLARE_NON_COPYABLE (Iterator)
}; };
/** The raw data holding this buffer. /** The raw data holding this buffer.


+ 1
- 1
source/modules/water/midi/MidiMessageSequence.h View File

@@ -90,7 +90,7 @@ public:
friend class MidiMessageSequence; friend class MidiMessageSequence;
MidiEventHolder (const MidiMessage&); MidiEventHolder (const MidiMessage&);
CARLA_DECLARE_NON_COPY_CLASS(MidiEventHolder);
CARLA_DECLARE_NON_COPYABLE(MidiEventHolder);
}; };
//============================================================================== //==============================================================================


+ 2
- 2
source/modules/water/processors/AudioProcessor.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2015 ROLI Ltd. Copyright (c) 2015 ROLI Ltd.
Copyright (C) 2017-2018 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the GNU Permission is granted to use this software under the terms of the GNU
General Public License as published by the Free Software Foundation; General Public License as published by the Free Software Foundation;
@@ -323,7 +323,7 @@ private:
uint numCVIns, numCVOuts; uint numCVIns, numCVOuts;
uint numMIDIIns, numMIDIOuts; uint numMIDIIns, numMIDIOuts;
CARLA_DECLARE_NON_COPY_CLASS (AudioProcessor)
CARLA_DECLARE_NON_COPYABLE (AudioProcessor)
}; };
} }


+ 12
- 12
source/modules/water/processors/AudioProcessorGraph.cpp View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2015 ROLI Ltd. Copyright (c) 2015 ROLI Ltd.
Copyright (C) 2017-2020 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the GNU Permission is granted to use this software under the terms of the GNU
General Public License as published by the Free Software Foundation; General Public License as published by the Free Software Foundation;
@@ -74,7 +74,7 @@ struct ClearChannelOp : public AudioGraphRenderingOp<ClearChannelOp>
const int channelNum; const int channelNum;
const bool isCV; const bool isCV;
CARLA_DECLARE_NON_COPY_CLASS (ClearChannelOp)
CARLA_DECLARE_NON_COPYABLE (ClearChannelOp)
}; };
//============================================================================== //==============================================================================
@@ -97,7 +97,7 @@ struct CopyChannelOp : public AudioGraphRenderingOp<CopyChannelOp>
const int srcChannelNum, dstChannelNum; const int srcChannelNum, dstChannelNum;
const bool isCV; const bool isCV;
CARLA_DECLARE_NON_COPY_CLASS (CopyChannelOp)
CARLA_DECLARE_NON_COPYABLE (CopyChannelOp)
}; };
//============================================================================== //==============================================================================
@@ -120,7 +120,7 @@ struct AddChannelOp : public AudioGraphRenderingOp<AddChannelOp>
const int srcChannelNum, dstChannelNum; const int srcChannelNum, dstChannelNum;
const bool isCV; const bool isCV;
CARLA_DECLARE_NON_COPY_CLASS (AddChannelOp)
CARLA_DECLARE_NON_COPYABLE (AddChannelOp)
}; };
//============================================================================== //==============================================================================
@@ -137,7 +137,7 @@ struct ClearMidiBufferOp : public AudioGraphRenderingOp<ClearMidiBufferOp>
const int bufferNum; const int bufferNum;
CARLA_DECLARE_NON_COPY_CLASS (ClearMidiBufferOp)
CARLA_DECLARE_NON_COPYABLE (ClearMidiBufferOp)
}; };
//============================================================================== //==============================================================================
@@ -156,7 +156,7 @@ struct CopyMidiBufferOp : public AudioGraphRenderingOp<CopyMidiBufferOp>
const int srcBufferNum, dstBufferNum; const int srcBufferNum, dstBufferNum;
CARLA_DECLARE_NON_COPY_CLASS (CopyMidiBufferOp)
CARLA_DECLARE_NON_COPYABLE (CopyMidiBufferOp)
}; };
//============================================================================== //==============================================================================
@@ -176,7 +176,7 @@ struct AddMidiBufferOp : public AudioGraphRenderingOp<AddMidiBufferOp>
const int srcBufferNum, dstBufferNum; const int srcBufferNum, dstBufferNum;
CARLA_DECLARE_NON_COPY_CLASS (AddMidiBufferOp)
CARLA_DECLARE_NON_COPYABLE (AddMidiBufferOp)
}; };
//============================================================================== //==============================================================================
@@ -217,7 +217,7 @@ private:
int readIndex, writeIndex; int readIndex, writeIndex;
const bool isCV; const bool isCV;
CARLA_DECLARE_NON_COPY_CLASS (DelayChannelOp)
CARLA_DECLARE_NON_COPYABLE (DelayChannelOp)
}; };
//============================================================================== //==============================================================================
@@ -306,7 +306,7 @@ private:
const uint totalCVOuts; const uint totalCVOuts;
const int midiBufferToUse; const int midiBufferToUse;
CARLA_DECLARE_NON_COPY_CLASS (ProcessBufferOp)
CARLA_DECLARE_NON_COPYABLE (ProcessBufferOp)
}; };
//============================================================================== //==============================================================================
@@ -956,7 +956,7 @@ private:
} }
} }
CARLA_DECLARE_NON_COPY_CLASS (RenderingOpSequenceCalculator)
CARLA_DECLARE_NON_COPYABLE (RenderingOpSequenceCalculator)
}; };
//============================================================================== //==============================================================================
@@ -998,7 +998,7 @@ private:
const uint32 destNodeId; const uint32 destNodeId;
SortedSet<uint32> srcNodes; SortedSet<uint32> srcNodes;
CARLA_DECLARE_NON_COPY_CLASS (Entry)
CARLA_DECLARE_NON_COPYABLE (Entry)
}; };
OwnedArray<Entry> entries; OwnedArray<Entry> entries;
@@ -1067,7 +1067,7 @@ private:
return result; return result;
} }
CARLA_DECLARE_NON_COPY_CLASS (ConnectionLookupTable)
CARLA_DECLARE_NON_COPYABLE (ConnectionLookupTable)
}; };
//============================================================================== //==============================================================================


+ 4
- 4
source/modules/water/processors/AudioProcessorGraph.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2015 ROLI Ltd. Copyright (c) 2015 ROLI Ltd.
Copyright (C) 2017-2018 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the GNU Permission is granted to use this software under the terms of the GNU
General Public License as published by the Free Software Foundation; General Public License as published by the Free Software Foundation;
@@ -97,7 +97,7 @@ public:
void prepare (double newSampleRate, int newBlockSize, AudioProcessorGraph*); void prepare (double newSampleRate, int newBlockSize, AudioProcessorGraph*);
void unprepare(); void unprepare();
CARLA_DECLARE_NON_COPY_CLASS (Node)
CARLA_DECLARE_NON_COPYABLE (Node)
}; };
//============================================================================== //==============================================================================
@@ -342,7 +342,7 @@ public:
AudioSampleBuffer& cvOutBuffer, AudioSampleBuffer& cvOutBuffer,
MidiBuffer& midiMessages); MidiBuffer& midiMessages);
CARLA_DECLARE_NON_COPY_CLASS (AudioGraphIOProcessor)
CARLA_DECLARE_NON_COPYABLE (AudioGraphIOProcessor)
}; };
//============================================================================== //==============================================================================
@@ -394,7 +394,7 @@ public:
void buildRenderingSequence(); void buildRenderingSequence();
bool isAnInputTo (uint32 possibleInputId, uint32 possibleDestinationId, int recursionCheck) const; bool isAnInputTo (uint32 possibleInputId, uint32 possibleDestinationId, int recursionCheck) const;
CARLA_DECLARE_NON_COPY_CLASS (AudioProcessorGraph)
CARLA_DECLARE_NON_COPYABLE (AudioProcessorGraph)
}; };
} }


+ 2
- 2
source/modules/water/streams/FileInputSource.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017-2018 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -53,7 +53,7 @@ private:
//============================================================================== //==============================================================================
const File file; const File file;
CARLA_DECLARE_NON_COPY_CLASS (FileInputSource)
CARLA_DECLARE_NON_COPYABLE (FileInputSource)
}; };
} }


+ 2
- 2
source/modules/water/streams/InputStream.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017-2018 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -259,7 +259,7 @@ protected:
InputStream() noexcept {} InputStream() noexcept {}
private: private:
CARLA_DECLARE_NON_COPY_CLASS (InputStream)
CARLA_DECLARE_NON_COPYABLE (InputStream)
}; };
} }


+ 2
- 2
source/modules/water/streams/MemoryInputStream.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 - ROLI Ltd. Copyright (c) 2016 - ROLI Ltd.
Copyright (C) 2021 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -93,7 +93,7 @@ private:
void createInternalCopy(); void createInternalCopy();
CARLA_DECLARE_NON_COPY_CLASS (MemoryInputStream)
CARLA_DECLARE_NON_COPYABLE (MemoryInputStream)
}; };
} }


+ 2
- 2
source/modules/water/streams/MemoryOutputStream.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -128,7 +128,7 @@ private:
void trimExternalBlockSize(); void trimExternalBlockSize();
char* prepareToWrite (size_t); char* prepareToWrite (size_t);
CARLA_DECLARE_NON_COPY_CLASS (MemoryOutputStream)
CARLA_DECLARE_NON_COPYABLE (MemoryOutputStream)
}; };
/** Copies all the data that has been written to a MemoryOutputStream into another stream. */ /** Copies all the data that has been written to a MemoryOutputStream into another stream. */


+ 2
- 2
source/modules/water/streams/OutputStream.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -237,7 +237,7 @@ private:
//============================================================================== //==============================================================================
String newLineString; String newLineString;
CARLA_DECLARE_NON_COPY_CLASS (OutputStream)
CARLA_DECLARE_NON_COPYABLE (OutputStream)
}; };
//============================================================================== //==============================================================================


+ 3
- 3
source/modules/water/threads/ChildProcess.cpp View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017-2020 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -117,7 +117,7 @@ public:
private: private:
PROCESS_INFORMATION processInfo; PROCESS_INFORMATION processInfo;
CARLA_DECLARE_NON_COPY_CLASS (ActiveProcess)
CARLA_DECLARE_NON_COPYABLE (ActiveProcess)
}; };
#else #else
class ChildProcess::ActiveProcess class ChildProcess::ActiveProcess
@@ -271,7 +271,7 @@ public:
int childPID; int childPID;
private: private:
CARLA_DECLARE_NON_COPY_CLASS (ActiveProcess)
CARLA_DECLARE_NON_COPYABLE (ActiveProcess)
}; };
#endif #endif


+ 2
- 2
source/modules/water/threads/ChildProcess.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -105,7 +105,7 @@ private:
class ActiveProcess; class ActiveProcess;
CarlaScopedPointer<ActiveProcess> activeProcess; CarlaScopedPointer<ActiveProcess> activeProcess;
CARLA_DECLARE_NON_COPY_CLASS (ChildProcess)
CARLA_DECLARE_NON_COPYABLE (ChildProcess)
}; };
} }


+ 4
- 4
source/modules/water/threads/ScopedLock.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -82,7 +82,7 @@ private:
//============================================================================== //==============================================================================
const LockType& lock_; const LockType& lock_;
CARLA_DECLARE_NON_COPY_CLASS (GenericScopedLock)
CARLA_DECLARE_NON_COPYABLE (GenericScopedLock)
}; };
@@ -155,7 +155,7 @@ private:
//============================================================================== //==============================================================================
const LockType& lock_; const LockType& lock_;
CARLA_DECLARE_NON_COPY_CLASS (GenericScopedUnlock)
CARLA_DECLARE_NON_COPYABLE (GenericScopedUnlock)
}; };
@@ -230,7 +230,7 @@ private:
const LockType& lock_; const LockType& lock_;
const bool lockWasSuccessful; const bool lockWasSuccessful;
CARLA_DECLARE_NON_COPY_CLASS (GenericScopedTryLock)
CARLA_DECLARE_NON_COPYABLE (GenericScopedTryLock)
}; };
} }


+ 2
- 2
source/modules/water/threads/SpinLock.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -102,7 +102,7 @@ private:
//============================================================================== //==============================================================================
mutable Atomic<int> lock; mutable Atomic<int> lock;
CARLA_DECLARE_NON_COPY_CLASS (SpinLock)
CARLA_DECLARE_NON_COPYABLE (SpinLock)
}; };
} }


+ 2
- 2
source/modules/water/xml/XmlDocument.h View File

@@ -3,7 +3,7 @@
This file is part of the Water library. This file is part of the Water library.
Copyright (c) 2016 ROLI Ltd. Copyright (c) 2016 ROLI Ltd.
Copyright (C) 2017-2018 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
Permission is granted to use this software under the terms of the ISC license Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/ http://www.isc.org/downloads/software-support-policy/isc-license/
@@ -176,7 +176,7 @@ private:
String expandExternalEntity (const String&); String expandExternalEntity (const String&);
String getParameterEntity (const String&); String getParameterEntity (const String&);
CARLA_DECLARE_NON_COPY_CLASS (XmlDocument)
CARLA_DECLARE_NON_COPYABLE (XmlDocument)
}; };
} }


+ 3
- 3
source/native-plugins/audio-base.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Native Plugins * Carla Native Plugins
* Copyright (C) 2013-2021 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -220,7 +220,7 @@ struct AudioFilePool {
return true; return true;
} }


CARLA_DECLARE_NON_COPY_STRUCT(AudioFilePool)
CARLA_DECLARE_NON_COPYABLE(AudioFilePool)
}; };


class AudioFileReader class AudioFileReader
@@ -862,7 +862,7 @@ private:
#endif #endif
} }


CARLA_DECLARE_NON_COPY_STRUCT(AudioFileReader)
CARLA_DECLARE_NON_COPYABLE(AudioFileReader)
}; };


#endif // AUDIO_BASE_HPP_INCLUDED #endif // AUDIO_BASE_HPP_INCLUDED

+ 1
- 1
source/native-plugins/audio-file.cpp View File

@@ -751,7 +751,7 @@ private:
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(InlineDisplay)
CARLA_DECLARE_NON_COPYABLE(InlineDisplay)
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
} fInlineDisplay; } fInlineDisplay;
#endif #endif


+ 2
- 2
source/native-plugins/bigmeter.cpp View File

@@ -319,12 +319,12 @@ private:
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(InlineDisplay)
CARLA_DECLARE_NON_COPYABLE(InlineDisplay)
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
} fInlineDisplay; } fInlineDisplay;


PluginClassEND(BigMeterPlugin) PluginClassEND(BigMeterPlugin)
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(BigMeterPlugin)
CARLA_DECLARE_NON_COPYABLE(BigMeterPlugin)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 1
- 1
source/native-plugins/external

@@ -1 +1 @@
Subproject commit 45a2d5b0a268180b4304ce27f22abbd3f8d5073c
Subproject commit f69a9e9abdc03e9d124656215839c0fe025a783a

+ 1
- 1
source/plugin/carla-lv2-ui.cpp View File

@@ -319,7 +319,7 @@ private:
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(UI);
CARLA_DECLARE_NON_COPYABLE(UI);
} fUI; } fUI;


// ---------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------------------


+ 3
- 3
source/plugin/carla-vst.cpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Native Plugins * Carla Native Plugins
* Copyright (C) 2013-2021 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -408,7 +408,7 @@ public:
if (kIsUsingUILauncher) if (kIsUsingUILauncher)
{ {
destoryUILauncher(fUiLauncher); destoryUILauncher(fUiLauncher);
fUiLauncher = createUILauncher((intptr_t)ptr, fDescriptor, fHandle);
fUiLauncher = createUILauncher((uintptr_t)ptr, fDescriptor, fHandle);
} }
else else
{ {
@@ -871,7 +871,7 @@ private:
carla_zeroStructs(mdata, kMaxMidiEvents); carla_zeroStructs(mdata, kMaxMidiEvents);
} }


CARLA_DECLARE_NON_COPY_STRUCT(FixedVstEvents);
CARLA_DECLARE_NON_COPYABLE(FixedVstEvents);
} fMidiOutEvents; } fMidiOutEvents;


char* fStateChunk; char* fStateChunk;


+ 1
- 1
source/plugin/ui_launcher.cpp View File

@@ -115,7 +115,7 @@ private:
const NativePluginHandle handle; const NativePluginHandle handle;
PluginWindow& pluginWindow; PluginWindow& pluginWindow;


CARLA_DECLARE_NON_COPY_CLASS(CarlaButtonWidget);
CARLA_DECLARE_NON_COPYABLE(CarlaButtonWidget);
}; };


END_NAMESPACE_DGL END_NAMESPACE_DGL


+ 1
- 1
source/theme/CarlaStyle.hpp View File

@@ -88,7 +88,7 @@ private:
CarlaStylePrivate* const d; CarlaStylePrivate* const d;
friend class CarlaStylePrivate; friend class CarlaStylePrivate;


CARLA_DECLARE_NON_COPY_CLASS(CarlaStyle);
CARLA_DECLARE_NON_COPYABLE(CarlaStyle);
}; };


#endif // CARLA_STYLE_HPP_INCLUDED #endif // CARLA_STYLE_HPP_INCLUDED

+ 1
- 1
source/theme/CarlaStylePlugin.hpp View File

@@ -41,7 +41,7 @@ public:
QStringList keys() const override; QStringList keys() const override;
#endif #endif


CARLA_DECLARE_NON_COPY_CLASS(CarlaStylePlugin);
CARLA_DECLARE_NON_COPYABLE(CarlaStylePlugin);
}; };


#endif // CARLA_STYLE_PLUGIN_HPP_INCLUDED #endif // CARLA_STYLE_PLUGIN_HPP_INCLUDED

+ 2
- 2
source/utils/CarlaBinaryUtils.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla binary utils * Carla binary utils
* Copyright (C) 2014-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2014-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -66,7 +66,7 @@ private:
bool fLoadedOk; bool fLoadedOk;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(CarlaMagic)
CARLA_DECLARE_NON_COPYABLE(CarlaMagic)
}; };
#endif #endif




+ 5
- 5
source/utils/CarlaBridgeUtils.hpp View File

@@ -256,7 +256,7 @@ struct BridgeAudioPool {


const char* getFilenameSuffix() const noexcept; const char* getFilenameSuffix() const noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(BridgeAudioPool)
CARLA_DECLARE_NON_COPYABLE(BridgeAudioPool)
}; };


// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
@@ -293,10 +293,10 @@ struct BridgeRtClientControl : public CarlaRingBufferControl<SmallStackBuffer> {
WaitHelper(BridgeRtClientControl& c) noexcept; WaitHelper(BridgeRtClientControl& c) noexcept;
~WaitHelper() noexcept; ~WaitHelper() noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(WaitHelper)
CARLA_DECLARE_NON_COPYABLE(WaitHelper)
}; };


CARLA_DECLARE_NON_COPY_STRUCT(BridgeRtClientControl)
CARLA_DECLARE_NON_COPYABLE(BridgeRtClientControl)
}; };


// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
@@ -325,7 +325,7 @@ struct BridgeNonRtClientControl : public CarlaRingBufferControl<BigStackBuffer>
// bridge, client // bridge, client
PluginBridgeNonRtClientOpcode readOpcode() noexcept; PluginBridgeNonRtClientOpcode readOpcode() noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(BridgeNonRtClientControl)
CARLA_DECLARE_NON_COPYABLE(BridgeNonRtClientControl)
}; };


// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
@@ -354,7 +354,7 @@ struct BridgeNonRtServerControl : public CarlaRingBufferControl<HugeStackBuffer>
void waitIfDataIsReachingLimit() noexcept; void waitIfDataIsReachingLimit() noexcept;
bool writeOpcode(const PluginBridgeNonRtServerOpcode opcode) noexcept; bool writeOpcode(const PluginBridgeNonRtServerOpcode opcode) noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(BridgeNonRtServerControl)
CARLA_DECLARE_NON_COPYABLE(BridgeNonRtServerControl)
}; };


// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------


+ 12
- 8
source/utils/CarlaDssiUtils.cpp View File

@@ -47,16 +47,20 @@ const char* find_dssi_ui(const char* const filename, const char* const label) no


std::vector<water::File> results; std::vector<water::File> results;


for (int i=water::File(pluginDir).findChildFiles(results,
water::File::findFiles|water::File::ignoreHiddenFiles, false); --i >= 0;)
if (const uint count = water::File(pluginDir).findChildFiles(results,
water::File::findFiles|water::File::ignoreHiddenFiles,
false))
{ {
const water::File& gui(results[i]);
const water::String& guiShortName(gui.getFileName());

if (guiShortName.startsWith(checkLabel) || guiShortName.startsWith(checkSName))
for (uint i=0; i<count; ++i)
{ {
guiFilename = gui.getFullPathName();
break;
const water::File& gui(results[i]);
const water::String& guiShortName(gui.getFileName());

if (guiShortName.startsWith(checkLabel) || guiShortName.startsWith(checkSName))
{
guiFilename = gui.getFullPathName();
break;
}
} }
} }




+ 2
- 2
source/utils/CarlaEngineUtils.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Engine utils * Carla Engine utils
* Copyright (C) 2011-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -225,7 +225,7 @@ private:
CarlaEngine::ProtectedData* const pData; CarlaEngine::ProtectedData* const pData;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(ScopedEngineEnvironmentLocker)
CARLA_DECLARE_NON_COPYABLE(ScopedEngineEnvironmentLocker)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 47
- 119
source/utils/CarlaJsfxUtils.hpp View File

@@ -22,16 +22,10 @@
#include "CarlaDefines.h" #include "CarlaDefines.h"
#include "CarlaBackend.h" #include "CarlaBackend.h"
#include "CarlaUtils.hpp" #include "CarlaUtils.hpp"
#include "CarlaString.hpp"
#include "CarlaBase64Utils.hpp"
#include "CarlaJuceUtils.hpp" #include "CarlaJuceUtils.hpp"


#include "water/files/File.h" #include "water/files/File.h"
#include "water/files/FileInputStream.h"
#include "water/xml/XmlElement.h"
#include "water/xml/XmlDocument.h"
#include "water/streams/MemoryInputStream.h"
#include "water/streams/MemoryOutputStream.h"
#include "water/text/String.h"


#ifdef YSFX_API #ifdef YSFX_API
# error YSFX_API is not private # error YSFX_API is not private
@@ -44,10 +38,9 @@ CARLA_BACKEND_START_NAMESPACE


// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------


class CarlaJsfxLogging
struct CarlaJsfxLogging
{ {
public:
static void logAll(intptr_t, ysfx_log_level level, const char *message)
static void logAll(intptr_t, const ysfx_log_level level, const char* const message)
{ {
switch (level) switch (level)
{ {
@@ -55,46 +48,51 @@ public:
carla_stdout("%s: %s", ysfx_log_level_string(level), message); carla_stdout("%s: %s", ysfx_log_level_string(level), message);
break; break;
case ysfx_log_warning: case ysfx_log_warning:
case ysfx_log_error:
carla_stderr("%s: %s", ysfx_log_level_string(level), message); carla_stderr("%s: %s", ysfx_log_level_string(level), message);
break; break;
case ysfx_log_error:
carla_stderr2("%s: %s", ysfx_log_level_string(level), message);
break;
} }
}; };


static void logErrorsOnly(intptr_t, ysfx_log_level level, const char *message)
static void logErrorsOnly(intptr_t, const ysfx_log_level level, const char* const message)
{ {
switch (level) switch (level)
{ {
case ysfx_log_info: case ysfx_log_info:
break; break;
case ysfx_log_warning: case ysfx_log_warning:
case ysfx_log_error:
carla_stderr("%s: %s", ysfx_log_level_string(level), message); carla_stderr("%s: %s", ysfx_log_level_string(level), message);
break; break;
case ysfx_log_error:
carla_stderr2("%s: %s", ysfx_log_level_string(level), message);
break;
} }
}; };
}; };


// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------


class CarlaJsfxCategories
struct CarlaJsfxCategories
{ {
public:
static PluginCategory getFromEffect(ysfx_t* effect) static PluginCategory getFromEffect(ysfx_t* effect)
{ {
PluginCategory category = PLUGIN_CATEGORY_OTHER; PluginCategory category = PLUGIN_CATEGORY_OTHER;


water::Array<const char*> tags;
int tagCount = (int)ysfx_get_tags(effect, nullptr, 0);
tags.resize(tagCount);
ysfx_get_tags(effect, tags.getRawDataPointer(), (uint32_t)tagCount);

for (int i = 0; i < tagCount && category == PLUGIN_CATEGORY_OTHER; ++i)
if (const uint32_t tagCount = ysfx_get_tags(effect, nullptr, 0))
{ {
water::CharPointer_UTF8 tag(tags[i]);
PluginCategory current = getFromTag(tag);
if (current != PLUGIN_CATEGORY_NONE)
category = current;
std::vector<const char*> tags;
tags.resize(tagCount);
ysfx_get_tags(effect, tags.data(), tagCount);

for (uint32_t i=0; i<tagCount && category == PLUGIN_CATEGORY_OTHER; ++i)
{
water::CharPointer_UTF8 tag(tags[i]);
PluginCategory current = getFromTag(tag);
if (current != PLUGIN_CATEGORY_NONE)
category = current;
}
} }


return category; return category;
@@ -130,124 +128,54 @@ public:
} }
}; };


// -------------------------------------------------------------------------------------------------------------------

class CarlaJsfxState
{
public:
static water::String convertToString(ysfx_state_t &state)
{
water::XmlElement root("JSFXState");

for (uint32_t i = 0; i < state.slider_count; ++i)
{
water::XmlElement *slider = new water::XmlElement("Slider");
slider->setAttribute("index", (int32_t)state.sliders[i].index);
slider->setAttribute("value", state.sliders[i].value);
root.addChildElement(slider);
}

{
const CarlaString base64 = CarlaString::asBase64(state.data, state.data_size);
water::XmlElement *var = new water::XmlElement("Serialization");
var->addTextElement(base64.buffer());
root.addChildElement(var);
}

water::MemoryOutputStream stream;
root.writeToStream(stream, water::StringRef(), true);
return stream.toUTF8();
}

static ysfx_state_u convertFromString(const water::String& string)
{
std::unique_ptr<water::XmlElement> root(water::XmlDocument::parse(string));

CARLA_SAFE_ASSERT_RETURN(root != nullptr, nullptr);
CARLA_SAFE_ASSERT_RETURN(root->getTagName() == "JSFXState", nullptr);

std::vector<ysfx_state_slider_t> sliders;
std::vector<uint8_t> serialization;

sliders.reserve(ysfx_max_sliders);

int numChildren = root->getNumChildElements();
for (int i = 0; i < numChildren; ++i)
{
water::XmlElement* child = root->getChildElement(i);
CARLA_SAFE_ASSERT_CONTINUE(child != nullptr);

if (child->getTagName() == "Slider")
{
CARLA_SAFE_ASSERT_CONTINUE(child->hasAttribute("index"));
CARLA_SAFE_ASSERT_CONTINUE(child->hasAttribute("value"));

ysfx_state_slider_t item;
int32_t index = child->getIntAttribute("index");
CARLA_SAFE_ASSERT_CONTINUE(index >= 0 && index < ysfx_max_sliders);

item.index = (uint32_t)index;
item.value = child->getDoubleAttribute("value");
sliders.push_back(item);
}
else if (child->getTagName() == "Serialization")
{
serialization = carla_getChunkFromBase64String(child->getAllSubText().toRawUTF8());
}
else
{
CARLA_SAFE_ASSERT_CONTINUE(false);
}
}

ysfx_state_t state;
state.sliders = sliders.data();
state.slider_count = (uint32_t)sliders.size();
state.data = serialization.data();
state.data_size = (uint32_t)serialization.size();

return ysfx_state_u(ysfx_state_dup(&state));
}
};

// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------


class CarlaJsfxUnit class CarlaJsfxUnit
{ {
public:
CarlaJsfxUnit() = default;

CarlaJsfxUnit(const water::File& rootPath, const water::File& filePath)
: fRootPath(rootPath), fFileId(filePath.getRelativePathFrom(rootPath))
static water::String createFileId(const water::File& rootPath, const water::File& filePath)
{ {
water::String fileId(filePath.getRelativePathFrom(rootPath));
#ifdef CARLA_OS_WIN #ifdef CARLA_OS_WIN
fFileId.replaceCharacter('\\', '/');
fileId.replaceCharacter('\\', '/');
#endif #endif
return fileId;
} }


explicit operator bool() const
public:
CarlaJsfxUnit() noexcept
: fFileId(),
fFilePath(),
fRootPath() {}

CarlaJsfxUnit(const water::File& rootPath, const water::File& filePath)
: fFileId(createFileId(rootPath, filePath)),
fFilePath(rootPath.getChildFile(fFileId).getFullPathName()),
fRootPath(rootPath.getFullPathName()) {}

explicit operator bool() const noexcept
{ {
return fFileId.isNotEmpty(); return fFileId.isNotEmpty();
} }


const water::File& getRootPath() const
const water::String& getFileId() const noexcept
{ {
return fRootPath;
return fFileId;
} }


const water::String& getFileId() const
const water::String& getFilePath() const noexcept
{ {
return fFileId;
return fFilePath;
} }


water::File getFilePath() const
const water::String& getRootPath() const noexcept
{ {
return fRootPath.getChildFile(fFileId);
return fRootPath;
} }


private: private:
water::File fRootPath;
water::String fFileId; water::String fFileId;
water::String fFilePath;
water::String fRootPath;
}; };


// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------


+ 2
- 2
source/utils/CarlaJuceUtils.hpp View File

@@ -57,13 +57,13 @@
::LeakedObjectDetector<ClassName> CARLA_JOIN_MACRO(leakDetector_, ClassName); ::LeakedObjectDetector<ClassName> CARLA_JOIN_MACRO(leakDetector_, ClassName);


# define CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \ # define CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \
CARLA_DECLARE_NON_COPY_CLASS(ClassName) \
CARLA_DECLARE_NON_COPYABLE(ClassName) \
CARLA_LEAK_DETECTOR(ClassName) CARLA_LEAK_DETECTOR(ClassName)
#else #else
/** Don't use leak detection on release builds. */ /** Don't use leak detection on release builds. */
# define CARLA_LEAK_DETECTOR(ClassName) # define CARLA_LEAK_DETECTOR(ClassName)
# define CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \ # define CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \
CARLA_DECLARE_NON_COPY_CLASS(ClassName)
CARLA_DECLARE_NON_COPYABLE(ClassName)
#endif #endif


//===================================================================================================================== //=====================================================================================================================


+ 1
- 1
source/utils/CarlaLogThread.hpp View File

@@ -215,7 +215,7 @@ private:
#endif #endif


//CARLA_PREVENT_HEAP_ALLOCATION //CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(CarlaLogThread)
CARLA_DECLARE_NON_COPYABLE(CarlaLogThread)
}; };


#ifdef CARLA_OS_WIN #ifdef CARLA_OS_WIN


+ 4
- 4
source/utils/CarlaLv2Utils.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla LV2 utils * Carla LV2 utils
* Copyright (C) 2011-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -550,7 +550,7 @@ public:
} }


CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_STRUCT(Lv2WorldClass)
CARLA_DECLARE_NON_COPYABLE(Lv2WorldClass)
}; };


// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------
@@ -1512,7 +1512,7 @@ protected:
} }
} }


CARLA_DECLARE_NON_COPY_STRUCT(Ports);
CARLA_DECLARE_NON_COPYABLE(Ports);
} fPorts; } fPorts;


// Rest of host<->plugin support // Rest of host<->plugin support
@@ -1669,7 +1669,7 @@ private:


// ---------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------------------


CARLA_DECLARE_NON_COPY_STRUCT(Lv2PluginBaseClass)
CARLA_DECLARE_NON_COPYABLE(Lv2PluginBaseClass)
}; };


// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------


+ 7
- 7
source/utils/CarlaMutex.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Mutex * Carla Mutex
* Copyright (C) 2013-2016 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -97,7 +97,7 @@ private:
mutable pthread_mutex_t fMutex; mutable pthread_mutex_t fMutex;
mutable volatile bool fTryLockWasCalled; // true if "tryLock()" was called at least once mutable volatile bool fTryLockWasCalled; // true if "tryLock()" was called at least once


CARLA_DECLARE_NON_COPY_CLASS(CarlaMutex)
CARLA_DECLARE_NON_COPYABLE(CarlaMutex)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -185,7 +185,7 @@ private:
mutable pthread_mutex_t fMutex; mutable pthread_mutex_t fMutex;
#endif #endif


CARLA_DECLARE_NON_COPY_CLASS(CarlaRecursiveMutex)
CARLA_DECLARE_NON_COPYABLE(CarlaRecursiveMutex)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -266,7 +266,7 @@ private:
volatile bool fTriggered; volatile bool fTriggered;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(CarlaSignal)
CARLA_DECLARE_NON_COPYABLE(CarlaSignal)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -291,7 +291,7 @@ private:
const Mutex& fMutex; const Mutex& fMutex;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(CarlaScopeLocker)
CARLA_DECLARE_NON_COPYABLE(CarlaScopeLocker)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -335,7 +335,7 @@ private:
const bool fLocked; const bool fLocked;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(CarlaScopeTryLocker)
CARLA_DECLARE_NON_COPYABLE(CarlaScopeTryLocker)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -360,7 +360,7 @@ private:
const Mutex& fMutex; const Mutex& fMutex;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(CarlaScopeUnlocker)
CARLA_DECLARE_NON_COPYABLE(CarlaScopeUnlocker)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 2
- 2
source/utils/CarlaOscUtils.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla OSC utils * Carla OSC utils
* Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -105,7 +105,7 @@ struct CarlaOscData {
#endif #endif


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_STRUCT(CarlaOscData)
CARLA_DECLARE_NON_COPYABLE(CarlaOscData)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 2
- 2
source/utils/CarlaPipeUtils.cpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Pipe Utilities * Carla Pipe Utilities
* Copyright (C) 2013-2019 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -632,7 +632,7 @@ struct CarlaPipeCommon::PrivateData {
carla_zeroChars(tmpBuf, 0xffff); carla_zeroChars(tmpBuf, 0xffff);
} }


CARLA_DECLARE_NON_COPY_STRUCT(PrivateData)
CARLA_DECLARE_NON_COPYABLE(PrivateData)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 2
- 2
source/utils/CarlaPluginUI.cpp View File

@@ -1165,7 +1165,7 @@ bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* cons
~ScopedDisplay() { if (display!=nullptr) XCloseDisplay(display); } ~ScopedDisplay() { if (display!=nullptr) XCloseDisplay(display); }
// c++ compat stuff // c++ compat stuff
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(ScopedDisplay)
CARLA_DECLARE_NON_COPYABLE(ScopedDisplay)
}; };
struct ScopedFreeData { struct ScopedFreeData {
union { union {
@@ -1177,7 +1177,7 @@ bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* cons
~ScopedFreeData() { XFree(data); } ~ScopedFreeData() { XFree(data); }
// c++ compat stuff // c++ compat stuff
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(ScopedFreeData)
CARLA_DECLARE_NON_COPYABLE(ScopedFreeData)
}; };


const ScopedDisplay sd; const ScopedDisplay sd;


+ 2
- 2
source/utils/CarlaPluginUI.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Plugin UI * Carla Plugin UI
* Copyright (C) 2014-2021 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2014-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -74,7 +74,7 @@ protected:
fIsResizable(isResizable), fIsResizable(isResizable),
fCallback(cb) {} fCallback(cb) {}


CARLA_DECLARE_NON_COPY_CLASS(CarlaPluginUI)
CARLA_DECLARE_NON_COPYABLE(CarlaPluginUI)
}; };


// ----------------------------------------------------- // -----------------------------------------------------


+ 3
- 3
source/utils/CarlaProcessUtils.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla process utils * Carla process utils
* Copyright (C) 2019-2021 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2019-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -116,7 +116,7 @@ private:
static void sig_handler(const int signum); static void sig_handler(const int signum);
#endif #endif


CARLA_DECLARE_NON_COPY_CLASS(ScopedAbortCatcher)
CARLA_DECLARE_NON_COPYABLE(ScopedAbortCatcher)
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
}; };


@@ -133,7 +133,7 @@ private:
struct ::sigaction sigs[16]; struct ::sigaction sigs[16];
#endif #endif


CARLA_DECLARE_NON_COPY_CLASS(CarlaSignalRestorer)
CARLA_DECLARE_NON_COPYABLE(CarlaSignalRestorer)
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
}; };




+ 4
- 4
source/utils/CarlaRingBuffer.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Ring Buffer * Carla Ring Buffer
* Copyright (C) 2013-2018 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -443,7 +443,7 @@ private:
bool fErrorWriting; bool fErrorWriting;


CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(CarlaRingBufferControl)
CARLA_DECLARE_NON_COPYABLE(CarlaRingBufferControl)
}; };


template <class BufferStruct> template <class BufferStruct>
@@ -509,7 +509,7 @@ private:
HeapBuffer fHeapBuffer; HeapBuffer fHeapBuffer;


CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(CarlaHeapRingBuffer)
CARLA_DECLARE_NON_COPYABLE(CarlaHeapRingBuffer)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -528,7 +528,7 @@ private:
SmallStackBuffer fStackBuffer; SmallStackBuffer fStackBuffer;


CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(CarlaSmallStackRingBuffer)
CARLA_DECLARE_NON_COPYABLE(CarlaSmallStackRingBuffer)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 3
- 3
source/utils/CarlaScopeUtils.hpp View File

@@ -89,7 +89,7 @@ private:
const char* key; const char* key;
const char* origValue; const char* origValue;


CARLA_DECLARE_NON_COPY_CLASS(CarlaScopedEnvVar)
CARLA_DECLARE_NON_COPYABLE(CarlaScopedEnvVar)
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
}; };


@@ -149,7 +149,7 @@ private:
const char* const oldloc; const char* const oldloc;
#endif #endif


CARLA_DECLARE_NON_COPY_CLASS(CarlaScopedLocale)
CARLA_DECLARE_NON_COPYABLE(CarlaScopedLocale)
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
}; };


@@ -391,7 +391,7 @@ private:
ValueType& value; ValueType& value;
const ValueType originalValue; const ValueType originalValue;


CARLA_DECLARE_NON_COPY_CLASS(CarlaScopedValueSetter)
CARLA_DECLARE_NON_COPYABLE(CarlaScopedValueSetter)
CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
}; };




+ 4
- 4
source/utils/CarlaStateUtils.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla State utils * Carla State utils
* Copyright (C) 2012-2017 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -45,7 +45,7 @@ struct CarlaStateSave {
Parameter() noexcept; Parameter() noexcept;
~Parameter() noexcept; ~Parameter() noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(Parameter)
CARLA_DECLARE_NON_COPYABLE(Parameter)
}; };


typedef LinkedList<Parameter*> ParameterList; typedef LinkedList<Parameter*> ParameterList;
@@ -60,7 +60,7 @@ struct CarlaStateSave {
~CustomData() noexcept; ~CustomData() noexcept;
bool isValid() const noexcept; bool isValid() const noexcept;


CARLA_DECLARE_NON_COPY_STRUCT(CustomData)
CARLA_DECLARE_NON_COPYABLE(CustomData)
}; };


typedef LinkedList<CustomData*> CustomDataList; typedef LinkedList<CustomData*> CustomDataList;
@@ -102,7 +102,7 @@ struct CarlaStateSave {
bool fillFromXmlElement(const water::XmlElement* const xmlElement); bool fillFromXmlElement(const water::XmlElement* const xmlElement);
void dumpToMemoryStream(water::MemoryOutputStream& stream) const; void dumpToMemoryStream(water::MemoryOutputStream& stream) const;


CARLA_DECLARE_NON_COPY_STRUCT(CarlaStateSave)
CARLA_DECLARE_NON_COPYABLE(CarlaStateSave)
}; };


static inline static inline


+ 2
- 2
source/utils/CarlaThread.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Thread * Carla Thread
* Copyright (C) 2013-2021 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -326,7 +326,7 @@ private:
return nullptr; return nullptr;
} }


CARLA_DECLARE_NON_COPY_CLASS(CarlaThread)
CARLA_DECLARE_NON_COPYABLE(CarlaThread)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 3
- 3
source/utils/LinkedList.hpp View File

@@ -1,6 +1,6 @@
/* /*
* High-level, templated, C++ doubly-linked list * High-level, templated, C++ doubly-linked list
* Copyright (C) 2013-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -508,7 +508,7 @@ private:
template<typename> friend class RtLinkedList; template<typename> friend class RtLinkedList;


CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(AbstractLinkedList)
CARLA_DECLARE_NON_COPYABLE(AbstractLinkedList)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -532,7 +532,7 @@ protected:
} }


CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(LinkedList)
CARLA_DECLARE_NON_COPYABLE(LinkedList)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 2
- 2
source/utils/Lv2AtomRingBuffer.hpp View File

@@ -1,6 +1,6 @@
/* /*
* LV2 Atom Ring Buffer * LV2 Atom Ring Buffer
* Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -213,7 +213,7 @@ private:
friend class Lv2AtomQueue; friend class Lv2AtomQueue;


CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(Lv2AtomRingBuffer)
CARLA_DECLARE_NON_COPYABLE(Lv2AtomRingBuffer)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 3
- 3
source/utils/RtLinkedList.hpp View File

@@ -1,6 +1,6 @@
/* /*
* High-level, real-time safe, templated, C++ doubly-linked list * High-level, real-time safe, templated, C++ doubly-linked list
* Copyright (C) 2013-2018 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -92,7 +92,7 @@ public:
mutable RtMemPool_Handle fHandle; mutable RtMemPool_Handle fHandle;


CARLA_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(Pool)
CARLA_DECLARE_NON_COPYABLE(Pool)
}; };


// ------------------------------------------------------------------- // -------------------------------------------------------------------
@@ -208,7 +208,7 @@ private:
} }


CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_CLASS(RtLinkedList)
CARLA_DECLARE_NON_COPYABLE(RtLinkedList)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 2
- 2
source/utils/ThreadSafeFFTW.hpp View File

@@ -1,6 +1,6 @@
/* /*
* Thread-safe fftw * Thread-safe fftw
* Copyright (C) 2018-2020 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2018-2022 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -87,7 +87,7 @@ private:
lib_t libfftw3l; lib_t libfftw3l;
lib_t libfftw3q; lib_t libfftw3q;


CARLA_DECLARE_NON_COPY_CLASS(ThreadSafeFFTW)
CARLA_DECLARE_NON_COPYABLE(ThreadSafeFFTW)
}; };
#endif #endif




Loading…
Cancel
Save