Signed-off-by: falkTX <falktx@falktx.com>tags/v2.5.0
| @@ -293,14 +293,14 @@ struct CARLA_API EngineOptions { | |||
| Wine() noexcept; | |||
| ~Wine() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(Wine) | |||
| CARLA_DECLARE_NON_COPYABLE(Wine) | |||
| } wine; | |||
| #endif | |||
| #ifndef DOXYGEN | |||
| EngineOptions() noexcept; | |||
| ~EngineOptions() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(EngineOptions) | |||
| CARLA_DECLARE_NON_COPYABLE(EngineOptions) | |||
| #endif | |||
| }; | |||
| @@ -426,7 +426,7 @@ protected: | |||
| const bool kIsInput; | |||
| const uint32_t kIndexOffset; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaEnginePort) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaEnginePort) | |||
| #endif | |||
| }; | |||
| @@ -473,7 +473,7 @@ public: | |||
| protected: | |||
| float* fBuffer; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineAudioPort) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaEngineAudioPort) | |||
| #endif | |||
| }; | |||
| @@ -535,7 +535,7 @@ protected: | |||
| float* fBuffer; | |||
| float fMinimum, fMaximum; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineCVPort) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaEngineCVPort) | |||
| #endif | |||
| }; | |||
| @@ -626,7 +626,7 @@ protected: | |||
| friend class CarlaPluginInstance; | |||
| friend class CarlaEngineCVSourcePorts; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineEventPort) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaEngineEventPort) | |||
| #endif | |||
| }; | |||
| @@ -682,7 +682,7 @@ protected: | |||
| */ | |||
| CarlaEngineCVSourcePorts(); | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineCVSourcePorts) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaEngineCVSourcePorts) | |||
| #endif | |||
| }; | |||
| @@ -795,7 +795,7 @@ protected: | |||
| */ | |||
| CarlaEngineClient(ProtectedData* pData); | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineClient) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaEngineClient) | |||
| #endif | |||
| }; | |||
| @@ -1387,7 +1387,7 @@ protected: | |||
| // ------------------------------------------------------------------- | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaEngine) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaEngine) | |||
| }; | |||
| /**@}*/ | |||
| @@ -138,7 +138,7 @@ typedef struct _CarlaPluginInfo { | |||
| */ | |||
| CARLA_API _CarlaPluginInfo() noexcept; | |||
| CARLA_API ~_CarlaPluginInfo() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(_CarlaPluginInfo) | |||
| CARLA_DECLARE_NON_COPYABLE(_CarlaPluginInfo) | |||
| #endif | |||
| } CarlaPluginInfo; | |||
| @@ -204,7 +204,7 @@ typedef struct _CarlaParameterInfo { | |||
| */ | |||
| CARLA_API _CarlaParameterInfo() noexcept; | |||
| CARLA_API ~_CarlaParameterInfo() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(_CarlaParameterInfo) | |||
| CARLA_DECLARE_NON_COPYABLE(_CarlaParameterInfo) | |||
| #endif | |||
| } CarlaParameterInfo; | |||
| @@ -230,7 +230,7 @@ typedef struct _CarlaScalePointInfo { | |||
| */ | |||
| CARLA_API _CarlaScalePointInfo() noexcept; | |||
| CARLA_API ~_CarlaScalePointInfo() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(_CarlaScalePointInfo) | |||
| CARLA_DECLARE_NON_COPYABLE(_CarlaScalePointInfo) | |||
| #endif | |||
| } CarlaScalePointInfo; | |||
| @@ -87,7 +87,7 @@ struct CarlaHostStandalone : CarlaHostHandleImpl { | |||
| } | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_STRUCT(CarlaHostStandalone) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaHostStandalone) | |||
| }; | |||
| // -------------------------------------------------------------------------------------------------------------------- | |||
| @@ -586,7 +586,7 @@ public: | |||
| /*! | |||
| * 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. | |||
| @@ -1040,7 +1040,7 @@ protected: | |||
| bool fWasEnabled; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(ScopedDisabler) | |||
| CARLA_DECLARE_NON_COPYABLE(ScopedDisabler) | |||
| }; | |||
| /*! | |||
| @@ -1059,12 +1059,12 @@ protected: | |||
| const bool fBlock; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(ScopedSingleProcessLocker) | |||
| CARLA_DECLARE_NON_COPYABLE(ScopedSingleProcessLocker) | |||
| }; | |||
| friend class CarlaEngine; | |||
| friend class CarlaEngineBridge; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaPlugin) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaPlugin) | |||
| }; | |||
| /**@}*/ | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -635,7 +635,7 @@ private: | |||
| #undef handlePtr | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaNSM) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaNSM) | |||
| }; | |||
| #endif // HAVE_LIBLO | |||
| @@ -133,7 +133,7 @@ typedef struct _CarlaCachedPluginInfo { | |||
| * C++ constructor. | |||
| */ | |||
| CARLA_API _CarlaCachedPluginInfo() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(_CarlaCachedPluginInfo) | |||
| CARLA_DECLARE_NON_COPYABLE(_CarlaCachedPluginInfo) | |||
| #endif | |||
| } CarlaCachedPluginInfo; | |||
| @@ -88,7 +88,7 @@ protected: | |||
| private: | |||
| LatencyChangedCallback* const fLatencyCallback; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineBridgeClient) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaEngineBridgeClient) | |||
| }; | |||
| // ------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -63,7 +63,7 @@ struct CarlaEngineClient::ProtectedData { | |||
| #ifdef CARLA_PROPER_CPP11_SUPPORT | |||
| ProtectedData() = delete; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(ProtectedData) | |||
| CARLA_DECLARE_NON_COPYABLE(ProtectedData) | |||
| #endif | |||
| }; | |||
| @@ -96,7 +96,7 @@ protected: | |||
| return pData->plugin; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineClientForStandalone) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaEngineClientForStandalone) | |||
| }; | |||
| typedef CarlaEngineClientForStandalone CarlaEngineClientForSubclassing; | |||
| #else | |||
| @@ -112,7 +112,7 @@ public: | |||
| delete pData; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineClientForBridge) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaEngineClientForBridge) | |||
| }; | |||
| typedef CarlaEngineClientForBridge CarlaEngineClientForSubclassing; | |||
| #endif | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * 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; | |||
| ExternalGraphPorts() noexcept; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(ExternalGraphPorts) | |||
| CARLA_DECLARE_NON_COPYABLE(ExternalGraphPorts) | |||
| }; | |||
| struct ExternalGraph { | |||
| @@ -108,7 +108,7 @@ struct ExternalGraph { | |||
| CarlaEngine* const kEngine; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(ExternalGraph) | |||
| CARLA_DECLARE_NON_COPYABLE(ExternalGraph) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -134,7 +134,7 @@ struct RackGraph { | |||
| ~Buffers() noexcept; | |||
| void setBufferSize(uint32_t bufferSize, bool createBuffers) noexcept; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(Buffers) | |||
| CARLA_DECLARE_NON_COPYABLE(Buffers) | |||
| } audioBuffers; | |||
| 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); | |||
| CarlaEngine* const kEngine; | |||
| CARLA_DECLARE_NON_COPY_CLASS(RackGraph) | |||
| CARLA_DECLARE_NON_COPYABLE(RackGraph) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -219,7 +219,7 @@ private: | |||
| void run() override; | |||
| CarlaEngine* const kEngine; | |||
| CARLA_DECLARE_NON_COPY_CLASS(PatchbayGraph) | |||
| CARLA_DECLARE_NON_COPYABLE(PatchbayGraph) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -64,7 +64,7 @@ struct EngineInternalEvents { | |||
| ~EngineInternalEvents() noexcept; | |||
| void clear() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalEvents) | |||
| CARLA_DECLARE_NON_COPYABLE(EngineInternalEvents) | |||
| }; | |||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
| @@ -137,7 +137,7 @@ private: | |||
| CarlaEngine* const kEngine; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalGraph) | |||
| CARLA_DECLARE_NON_COPYABLE(EngineInternalGraph) | |||
| }; | |||
| #endif // BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
| @@ -174,7 +174,7 @@ private: | |||
| Hylia(); | |||
| ~Hylia(); | |||
| CARLA_DECLARE_NON_COPY_STRUCT(Hylia) | |||
| CARLA_DECLARE_NON_COPYABLE(Hylia) | |||
| } hylia; | |||
| #endif | |||
| @@ -188,7 +188,7 @@ private: | |||
| friend class CarlaEngineJack; | |||
| 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; | |||
| 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 | |||
| ProtectedData() = delete; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(ProtectedData) | |||
| CARLA_DECLARE_NON_COPYABLE(ProtectedData) | |||
| #endif | |||
| }; | |||
| @@ -342,7 +342,7 @@ private: | |||
| int64_t prevTime; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(PendingRtEventsRunner) | |||
| CARLA_DECLARE_NON_COPYABLE(PendingRtEventsRunner) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -357,7 +357,7 @@ private: | |||
| CarlaEngine::ProtectedData* const pData; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(ScopedActionLock) | |||
| CARLA_DECLARE_NON_COPYABLE(ScopedActionLock) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -373,7 +373,7 @@ private: | |||
| CarlaEngine::ProtectedData* const pData; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(ScopedThreadStopper) | |||
| CARLA_DECLARE_NON_COPYABLE(ScopedThreadStopper) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -771,7 +771,7 @@ private: | |||
| EngineEvent* fBuffer; | |||
| EngineEvent* fBufferToDeleteLater; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaEngineJackCVSourcePorts) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaEngineJackCVSourcePorts) | |||
| }; | |||
| #endif | |||
| @@ -1019,7 +1019,7 @@ protected: | |||
| { | |||
| uint32_t rindex = index; | |||
| if (const CarlaPluginPtr plugin = _getPluginForParameterIndex(rindex)) | |||
| plugin->setParameterValueRT(rindex, value, false); | |||
| plugin->setParameterValueRT(rindex, value, 0, false); | |||
| fParameters[index] = value; | |||
| } | |||
| @@ -1710,7 +1710,7 @@ private: | |||
| CarlaJUCE::dispatchMessageManagerMessages(); | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(ScopedJuceMessageThreadRunner) | |||
| CARLA_DECLARE_NON_COPYABLE(ScopedJuceMessageThreadRunner) | |||
| }; | |||
| #endif | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -63,7 +63,7 @@ struct CarlaEngineCVSourcePorts::ProtectedData { | |||
| cvs.clear(); | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(ProtectedData) | |||
| CARLA_DECLARE_NON_COPYABLE(ProtectedData) | |||
| }; | |||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
| @@ -75,7 +75,7 @@ struct ParamSymbol { | |||
| #ifdef CARLA_PROPER_CPP11_SUPPORT | |||
| ParamSymbol() = delete; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(ParamSymbol) | |||
| CARLA_DECLARE_NON_COPYABLE(ParamSymbol) | |||
| #endif | |||
| }; | |||
| @@ -573,7 +573,7 @@ const CarlaStateSave& CarlaPlugin::getStateSave(const bool callPrepareForSave) | |||
| { | |||
| pData->stateSave.chunk = CarlaString::asBase64(data, dataSize).dup(); | |||
| if (pluginType != PLUGIN_INTERNAL) | |||
| if (pluginType != PLUGIN_INTERNAL && pluginType != PLUGIN_JSFX) | |||
| usingChunk = true; | |||
| } | |||
| } | |||
| @@ -1672,7 +1672,7 @@ void CarlaPlugin::setParameterValue(const uint32_t parameterId, const float valu | |||
| 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); | |||
| } | |||
| @@ -79,7 +79,7 @@ struct BridgeParamInfo { | |||
| symbol(), | |||
| unit() {} | |||
| CARLA_DECLARE_NON_COPY_STRUCT(BridgeParamInfo) | |||
| CARLA_DECLARE_NON_COPYABLE(BridgeParamInfo) | |||
| }; | |||
| // --------------------------------------------------------------------------------------------------------------------- | |||
| @@ -771,7 +771,7 @@ public: | |||
| 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,); | |||
| @@ -788,7 +788,7 @@ public: | |||
| 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 | |||
| @@ -1503,7 +1503,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); | |||
| setParameterValueRT(k, value, true); | |||
| setParameterValueRT(k, value, event.time, true); | |||
| continue; | |||
| } | |||
| @@ -1564,7 +1564,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); | |||
| setParameterValueRT(k, value, true); | |||
| setParameterValueRT(k, value, event.time, true); | |||
| } | |||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
| @@ -2989,7 +2989,7 @@ private: | |||
| char* strBuf; | |||
| CarlaMutex mutex; | |||
| CARLA_DECLARE_NON_COPY_CLASS(ReceivingParamText) | |||
| CARLA_DECLARE_NON_COPYABLE(ReceivingParamText) | |||
| } fReceivingParamText; | |||
| struct Info { | |||
| @@ -3081,7 +3081,7 @@ private: | |||
| aIns = aOuts = cvIns = cvOuts = 0; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(Info) | |||
| CARLA_DECLARE_NON_COPYABLE(Info) | |||
| } fInfo; | |||
| int64_t fUniqueId; | |||
| @@ -424,11 +424,11 @@ public: | |||
| 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); | |||
| CarlaPlugin::setParameterValueRT(parameterId, fixedValue, sendCallbackLater); | |||
| CarlaPlugin::setParameterValueRT(parameterId, fixedValue, frameOffset, sendCallbackLater); | |||
| } | |||
| float setParameterValueInFluidSynth(const uint32_t parameterId, const float value) noexcept | |||
| @@ -1299,7 +1299,7 @@ public: | |||
| continue; | |||
| 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) | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -142,7 +142,7 @@ struct PluginAudioData { | |||
| void clear() 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 initBuffers() const noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(PluginCVData) | |||
| CARLA_DECLARE_NON_COPYABLE(PluginCVData) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -180,7 +180,7 @@ struct PluginEventData { | |||
| void clear() 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 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 clear() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(PluginProgramData) | |||
| CARLA_DECLARE_NON_COPYABLE(PluginProgramData) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -232,7 +232,7 @@ struct PluginMidiProgramData { | |||
| void clear() 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 clear() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(ExternalNotes) | |||
| CARLA_DECLARE_NON_COPYABLE(ExternalNotes) | |||
| } extNotes; | |||
| @@ -316,7 +316,7 @@ struct CarlaPlugin::ProtectedData { | |||
| void recreateBuffers(uint32_t newChannels, uint32_t newFrames); | |||
| #endif | |||
| CARLA_DECLARE_NON_COPY_STRUCT(Latency) | |||
| CARLA_DECLARE_NON_COPYABLE(Latency) | |||
| } latency; | |||
| @@ -368,7 +368,7 @@ struct CarlaPlugin::ProtectedData { | |||
| CarlaMutex dataPendingMutex; | |||
| CarlaMutex poolMutex; | |||
| CARLA_DECLARE_NON_COPY_CLASS(PostRtEvents) | |||
| CARLA_DECLARE_NON_COPYABLE(PostRtEvents) | |||
| } postRtEvents; | |||
| @@ -381,7 +381,7 @@ struct CarlaPlugin::ProtectedData { | |||
| void append(const PluginPostRtEvent& event) noexcept; | |||
| void clear() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(PostUiEvents) | |||
| CARLA_DECLARE_NON_COPYABLE(PostUiEvents) | |||
| } postUiEvents; | |||
| @@ -395,7 +395,7 @@ struct CarlaPlugin::ProtectedData { | |||
| PostProc() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(PostProc) | |||
| CARLA_DECLARE_NON_COPYABLE(PostProc) | |||
| } postProc; | |||
| #endif | |||
| @@ -457,7 +457,7 @@ struct CarlaPlugin::ProtectedData { | |||
| #ifdef CARLA_PROPER_CPP11_SUPPORT | |||
| ProtectedData() = delete; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(ProtectedData); | |||
| CARLA_DECLARE_NON_COPYABLE(ProtectedData); | |||
| #endif | |||
| CARLA_LEAK_DETECTOR(ProtectedData); | |||
| }; | |||
| @@ -49,12 +49,19 @@ class CarlaPluginJSFX : public CarlaPlugin | |||
| public: | |||
| CarlaPluginJSFX(CarlaEngine* const engine, const uint id) noexcept | |||
| : CarlaPlugin(engine, id), | |||
| fEffect(nullptr), | |||
| fEffectState(nullptr), | |||
| fUnit(), | |||
| fChunkText(), | |||
| fTransportValues(), | |||
| fMapOfSliderToParameter(ysfx_max_sliders, -1) | |||
| { | |||
| carla_debug("CarlaPluginJSFX::CarlaPluginJSFX(%p, %i)", engine, id); | |||
| carla_zeroStruct(fTransportValues); | |||
| } | |||
| ~CarlaPluginJSFX() | |||
| ~CarlaPluginJSFX() noexcept override | |||
| { | |||
| carla_debug("CarlaPluginJSFX::~CarlaPluginJSFX()"); | |||
| @@ -71,6 +78,9 @@ public: | |||
| } | |||
| clearBuffers(); | |||
| ysfx_state_free(fEffectState); | |||
| ysfx_free(fEffect); | |||
| } | |||
| // ------------------------------------------------------------------- | |||
| @@ -85,15 +95,15 @@ public: | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, CarlaPlugin::getCategory()); | |||
| return CarlaJsfxCategories::getFromEffect(fEffect.get()); | |||
| return CarlaJsfxCategories::getFromEffect(fEffect); | |||
| } | |||
| uint32_t getLatencyInFrames() const noexcept override | |||
| { | |||
| 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 | |||
| @@ -120,25 +130,24 @@ public: | |||
| { | |||
| 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) | |||
| 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(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); | |||
| 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 | |||
| @@ -174,35 +183,15 @@ public: | |||
| CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, 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 | |||
| @@ -216,13 +205,18 @@ public: | |||
| { | |||
| 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); | |||
| 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 | |||
| @@ -239,32 +233,34 @@ public: | |||
| CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr,); | |||
| 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); | |||
| } | |||
| 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(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 | |||
| { | |||
| 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 | |||
| // 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 | |||
| pData->client->setLatency(getLatencyInFrames()); | |||
| @@ -315,7 +311,7 @@ public: | |||
| uint32_t mapOfParameterToSlider[ysfx_max_sliders]; | |||
| 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; | |||
| fMapOfSliderToParameter[rindex] = (int32_t)params; | |||
| @@ -332,7 +328,7 @@ public: | |||
| pData->param.createNew(params, false); | |||
| } | |||
| const uint portNameSize(pData->engine->getMaxPortNameSize()); | |||
| const uint portNameSize = pData->engine->getMaxPortNameSize(); | |||
| CarlaString portName; | |||
| // Audio Ins | |||
| @@ -346,7 +342,7 @@ public: | |||
| 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]) | |||
| { | |||
| portName += inputName; | |||
| @@ -376,7 +372,7 @@ public: | |||
| 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]) | |||
| { | |||
| portName += outputName; | |||
| @@ -404,21 +400,24 @@ public: | |||
| pData->param.data[j].rindex = (int32_t)rindex; | |||
| 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 max = (float)range.max; | |||
| float def = (float)range.def; | |||
| float step = (float)range.inc; | |||
| float stepSmall; | |||
| float stepLarge; | |||
| // 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>; | |||
| // these are usually output-only sliders. | |||
| if (min == max) | |||
| if (carla_isEqual(min, max)) | |||
| { | |||
| // replace with a dummy range | |||
| min = 0.0f; | |||
| @@ -433,30 +432,20 @@ public: | |||
| else if (def > max) | |||
| def = max; | |||
| float stepSmall; | |||
| float stepLarge; | |||
| pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | |||
| if (isEnum) | |||
| { | |||
| step = 1.0f; | |||
| stepSmall = 1.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_USES_SCALEPOINTS; | |||
| pData->param.data[j].hints |= PARAMETER_USES_CUSTOM_TEXT; | |||
| } | |||
| else | |||
| { | |||
| stepSmall = step/10.0f; | |||
| stepLarge = step*10.0f; | |||
| pData->param.data[j].hints |= PARAMETER_CAN_BE_CV_CONTROLLED; | |||
| } | |||
| @@ -508,9 +497,9 @@ public: | |||
| { | |||
| 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.playback_state = ysfx_playback_paused; | |||
| @@ -546,7 +535,7 @@ public: | |||
| 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 | |||
| @@ -573,7 +562,7 @@ public: | |||
| event.offset = 0; | |||
| event.size = 3; | |||
| event.data = midiData; | |||
| ysfx_send_midi(fEffect.get(), &event); | |||
| ysfx_send_midi(fEffect, &event); | |||
| } | |||
| pData->extNotes.data.clear(); | |||
| @@ -595,17 +584,6 @@ public: | |||
| if (event.time >= frames) | |||
| 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) | |||
| { | |||
| case kEngineEventTypeNull: | |||
| @@ -631,7 +609,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); | |||
| setParameterValueRT(k, value, true); | |||
| setParameterValueRT(k, value, event.time, true); | |||
| continue; | |||
| } | |||
| @@ -692,7 +670,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| 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) | |||
| @@ -702,7 +680,12 @@ public: | |||
| midiData[1] = uint8_t(ctrlEvent.param); | |||
| 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 | |||
| @@ -719,11 +702,21 @@ public: | |||
| midiData[0] = uint8_t(MIDI_STATUS_CONTROL_CHANGE | (event.channel & MIDI_CHANNEL_BIT)); | |||
| midiData[1] = MIDI_CONTROL_BANK_SELECT; | |||
| 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[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; | |||
| @@ -737,10 +730,15 @@ public: | |||
| } | |||
| 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[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; | |||
| @@ -751,8 +749,12 @@ public: | |||
| midiData[0] = uint8_t(MIDI_STATUS_CONTROL_CHANGE | (event.channel & MIDI_CHANNEL_BIT)); | |||
| midiData[1] = MIDI_CONTROL_ALL_SOUND_OFF; | |||
| 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; | |||
| @@ -772,7 +774,12 @@ public: | |||
| midiData[1] = MIDI_CONTROL_ALL_NOTES_OFF; | |||
| 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; | |||
| } // switch (ctrlEvent.type) | |||
| @@ -806,7 +813,12 @@ public: | |||
| midiData2[0] = uint8_t(status | (event.channel & MIDI_CHANNEL_BIT)); | |||
| 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) | |||
| { | |||
| @@ -827,9 +839,9 @@ public: | |||
| // -------------------------------------------------------------------------------------------------------- | |||
| // 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) | |||
| @@ -840,7 +852,7 @@ public: | |||
| { | |||
| 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.size > 0); | |||
| @@ -858,8 +870,8 @@ public: | |||
| // 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) | |||
| { | |||
| @@ -875,8 +887,8 @@ public: | |||
| int32_t parameterIndex = fMapOfSliderToParameter[rindex]; | |||
| 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 currentFile = currentPath.getChildFile(CharPointer_UTF8(label)); | |||
| const CarlaJsfxUnit currentUnit(currentPath, currentFile); | |||
| if (currentUnit.getFilePath().existsAsFile()) | |||
| if (File(currentUnit.getFilePath()).existsAsFile()) | |||
| fUnit = currentUnit; | |||
| } | |||
| } | |||
| @@ -961,8 +973,8 @@ public: | |||
| ysfx_config_u config(ysfx_config_new()); | |||
| 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_set_import_root(config.get(), rootPath.toRawUTF8()); | |||
| @@ -970,14 +982,14 @@ public: | |||
| ysfx_set_log_reporter(config.get(), &CarlaJsfxLogging::logAll); | |||
| 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); | |||
| // --------------------------------------------------------------- | |||
| // 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"); | |||
| return false; | |||
| @@ -989,7 +1001,7 @@ public: | |||
| | ysfx_compile_no_gfx | |||
| ; | |||
| if (! ysfx_compile(fEffect.get(), compileFlags)) | |||
| if (! ysfx_compile(fEffect, compileFlags)) | |||
| { | |||
| pData->engine->setLastError("Failed to compile JSFX"); | |||
| return false; | |||
| @@ -1002,7 +1014,7 @@ public: | |||
| } | |||
| else | |||
| { | |||
| pData->name = carla_strdup(ysfx_get_name(fEffect.get())); | |||
| pData->name = carla_strdup(ysfx_get_name(fEffect)); | |||
| } | |||
| pData->filename = carla_strdup(filePath.toRawUTF8()); | |||
| @@ -1045,11 +1057,14 @@ public: | |||
| } | |||
| private: | |||
| ysfx_u fEffect = nullptr; | |||
| ysfx_t* fEffect; | |||
| ysfx_state_t* fEffectState; | |||
| CarlaJsfxUnit fUnit; | |||
| water::String fChunkText; | |||
| ysfx_time_info_t fTransportValues = {}; | |||
| ysfx_time_info_t fTransportValues; | |||
| std::vector<int32_t> fMapOfSliderToParameter; | |||
| CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginJSFX) | |||
| }; | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -497,7 +497,7 @@ private: | |||
| return true; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(ProjectData) | |||
| CARLA_DECLARE_NON_COPYABLE(ProjectData) | |||
| } fProject; | |||
| #endif | |||
| @@ -1818,7 +1818,7 @@ private: | |||
| setupLabel(), | |||
| chunk() {} | |||
| CARLA_DECLARE_NON_COPY_STRUCT(Info) | |||
| CARLA_DECLARE_NON_COPYABLE(Info) | |||
| } fInfo; | |||
| void handleProcessStopped() noexcept | |||
| @@ -371,7 +371,7 @@ public: | |||
| 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(fInstance != nullptr,); | |||
| @@ -385,7 +385,7 @@ public: | |||
| parameter->setValue(value); | |||
| } 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 | |||
| @@ -1083,7 +1083,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); | |||
| setParameterValueRT(k, value, true); | |||
| setParameterValueRT(k, value, event.time, true); | |||
| continue; | |||
| } | |||
| @@ -1144,7 +1144,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| 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) | |||
| @@ -1189,7 +1189,7 @@ public: | |||
| } | |||
| 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[1] = uint8_t(ctrlEvent.normalizedValue*127.0f + 0.5f); | |||
| fMidiBuffer.addEvent(midiData, 2, static_cast<int>(event.time)); | |||
| @@ -732,7 +732,7 @@ public: | |||
| 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(parameterId < pData->param.count,); | |||
| @@ -740,7 +740,7 @@ public: | |||
| const float fixedValue(pData->param.getFixedValue(parameterId, value)); | |||
| 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 | |||
| @@ -1657,7 +1657,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); | |||
| setParameterValueRT(k, value, true); | |||
| setParameterValueRT(k, value, event.time, true); | |||
| continue; | |||
| } | |||
| @@ -1717,7 +1717,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| 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) | |||
| @@ -263,7 +263,7 @@ struct Lv2EventData { | |||
| } | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(Lv2EventData) | |||
| CARLA_DECLARE_NON_COPYABLE(Lv2EventData) | |||
| }; | |||
| 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); | |||
| } | |||
| 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(parameterId < pData->param.count,); | |||
| 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 | |||
| @@ -4018,7 +4018,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); | |||
| setParameterValueRT(k, value, true); | |||
| setParameterValueRT(k, value, event.time, true); | |||
| continue; | |||
| } | |||
| @@ -4084,7 +4084,7 @@ public: | |||
| else | |||
| 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) | |||
| @@ -6332,7 +6332,7 @@ public: | |||
| { | |||
| if (pData->param.data[i].rindex == rindex) | |||
| { | |||
| setParameterValueRT(i, paramValue, true); | |||
| setParameterValueRT(i, paramValue, 0, true); | |||
| break; | |||
| } | |||
| } | |||
| @@ -7467,7 +7467,7 @@ private: | |||
| uiresize(nullptr), | |||
| uiprograms(nullptr) {} | |||
| CARLA_DECLARE_NON_COPY_STRUCT(Extensions); | |||
| CARLA_DECLARE_NON_COPYABLE(Extensions); | |||
| } fExt; | |||
| struct UI { | |||
| @@ -7511,7 +7511,7 @@ private: | |||
| CARLA_SAFE_ASSERT(window == nullptr); | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(UI); | |||
| CARLA_DECLARE_NON_COPYABLE(UI); | |||
| } fUI; | |||
| // ------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * 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 { | |||
| @@ -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); | |||
| } | |||
| 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->set_parameter_value != nullptr,); | |||
| @@ -779,7 +779,7 @@ public: | |||
| if (fHandle2 != nullptr) | |||
| 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 | |||
| @@ -1990,7 +1990,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); | |||
| setParameterValueRT(k, value, true); | |||
| setParameterValueRT(k, value, event.time, true); | |||
| continue; | |||
| } | |||
| @@ -2050,7 +2050,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| 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) | |||
| @@ -466,7 +466,7 @@ public: | |||
| continue; | |||
| 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) | |||
| @@ -413,7 +413,7 @@ public: | |||
| 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(parameterId < pData->param.count,); | |||
| @@ -421,7 +421,7 @@ public: | |||
| const float fixedValue(pData->param.getFixedValue(parameterId, value)); | |||
| 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 | |||
| @@ -1425,7 +1425,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); | |||
| setParameterValueRT(k, value, true); | |||
| setParameterValueRT(k, value, event.time, true); | |||
| continue; | |||
| } | |||
| @@ -1486,7 +1486,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| 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) | |||
| @@ -2768,7 +2768,7 @@ private: | |||
| carla_zeroPointers(data, kPluginMaxMidiEvents*2); | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(FixedVstEvents); | |||
| CARLA_DECLARE_NON_COPYABLE(FixedVstEvents); | |||
| } fEvents; | |||
| struct UI { | |||
| @@ -2794,7 +2794,7 @@ private: | |||
| } | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(UI); | |||
| CARLA_DECLARE_NON_COPYABLE(UI); | |||
| } fUI; | |||
| int fUnique2; | |||
| @@ -65,7 +65,7 @@ void strncpy_utf8(char* const dst, const int16_t* const src, const size_t length | |||
| if (src[i] >= 0x80) | |||
| continue; | |||
| dst[i] = src[i]; | |||
| dst[i] = static_cast<char>(src[i]); | |||
| } | |||
| dst[len] = 0; | |||
| } | |||
| @@ -300,7 +300,8 @@ public: | |||
| CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0.0f); | |||
| 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 | |||
| @@ -332,7 +333,9 @@ public: | |||
| CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false); | |||
| v3_param_info paramInfo = {}; | |||
| CARLA_SAFE_ASSERT_RETURN(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller, parameterId, ¶mInfo) == V3_OK, false); | |||
| CARLA_SAFE_ASSERT_RETURN(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller, | |||
| static_cast<int32_t>(parameterId), | |||
| ¶mInfo) == V3_OK, false); | |||
| strncpy_utf8(strBuf, paramInfo.title, STR_MAX); | |||
| return true; | |||
| @@ -363,7 +366,9 @@ public: | |||
| CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false); | |||
| v3_param_info paramInfo = {}; | |||
| CARLA_SAFE_ASSERT_RETURN(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller, parameterId, ¶mInfo) == V3_OK, false); | |||
| CARLA_SAFE_ASSERT_RETURN(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller, | |||
| static_cast<int32_t>(parameterId), | |||
| ¶mInfo) == V3_OK, false); | |||
| strncpy_utf8(strBuf, paramInfo.units, STR_MAX); | |||
| return true; | |||
| @@ -393,7 +398,7 @@ public: | |||
| 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(parameterId < pData->param.count,); | |||
| @@ -402,7 +407,7 @@ public: | |||
| // 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) | |||
| { | |||
| 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 height = rect.bottom - rect.top; | |||
| @@ -553,22 +558,24 @@ public: | |||
| { | |||
| 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(busInfo.channel_count >= 0); | |||
| if (busInfo.flags & V3_IS_CONTROL_VOLTAGE) | |||
| cvIns += busInfo.channel_count; | |||
| cvIns += static_cast<uint32_t>(busInfo.channel_count); | |||
| else | |||
| aIns += busInfo.channel_count; | |||
| aIns += static_cast<uint32_t>(busInfo.channel_count); | |||
| } | |||
| for (int32_t j=0; j<numAudioInputBuses; ++j) | |||
| { | |||
| 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(busInfo.channel_count >= 0); | |||
| if (busInfo.flags & V3_IS_CONTROL_VOLTAGE) | |||
| cvOuts += busInfo.channel_count; | |||
| cvOuts += static_cast<uint32_t>(busInfo.channel_count); | |||
| else | |||
| aOuts += busInfo.channel_count; | |||
| aOuts += static_cast<uint32_t>(busInfo.channel_count); | |||
| } | |||
| for (int32_t j=0; j<numParameters; ++j) | |||
| @@ -729,16 +736,16 @@ public: | |||
| pData->param.data[j].rindex = ij; | |||
| v3_param_info paramInfo = {}; | |||
| CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller, j, ¶mInfo) == V3_OK); | |||
| CARLA_SAFE_ASSERT_BREAK(v3_cpp_obj(fV3.controller)->get_parameter_info(fV3.controller, ij, ¶mInfo) == V3_OK); | |||
| if (paramInfo.flags & (V3_PARAM_IS_BYPASS|V3_PARAM_IS_HIDDEN|V3_PARAM_PROGRAM_CHANGE)) | |||
| continue; | |||
| 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) | |||
| max = min + 0.1f; | |||
| @@ -1121,7 +1128,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| value = pData->param.getFinalUnnormalizedValue(k, ctrlEvent.normalizedValue); | |||
| setParameterValueRT(k, value, true); | |||
| setParameterValueRT(k, value, event.time, true); | |||
| continue; | |||
| } | |||
| @@ -1182,7 +1189,7 @@ public: | |||
| ctrlEvent.handled = true; | |||
| 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) | |||
| @@ -1618,7 +1625,7 @@ public: | |||
| bool init(const CarlaPluginPtr plugin, | |||
| const char* const filename, | |||
| const char* name, | |||
| const char* const label, | |||
| const char* /*const label*/, | |||
| const uint options) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr, false); | |||
| @@ -1871,7 +1878,7 @@ private: | |||
| v3_process_context fV3TimeContext; | |||
| 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 | |||
| union ClassInfo { | |||
| @@ -1998,11 +2005,11 @@ private: | |||
| // if we cannot cast from component, try to create edit controller from factory | |||
| 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; | |||
| 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); | |||
| } | |||
| @@ -2087,6 +2094,7 @@ private: | |||
| return false; | |||
| } | |||
| CARLA_DECLARE_NON_COPYABLE(Pointers) | |||
| } fV3; | |||
| struct UI { | |||
| @@ -2112,8 +2120,10 @@ private: | |||
| } | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(UI); | |||
| CARLA_DECLARE_NON_COPYABLE(UI) | |||
| } fUI; | |||
| CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginVST3) | |||
| }; | |||
| // -------------------------------------------------------------------------------------------------------------------- | |||
| @@ -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) | |||
| { | |||
| gJSFXs.clearQuick(); | |||
| gJSFXs.clear(); | |||
| 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) | |||
| { | |||
| 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(); | |||
| 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()); | |||
| 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_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: { | |||
| 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: | |||
| @@ -1523,7 +1523,7 @@ static void do_vst3_check(lib_t& libHandle, const char* const filename, const bo | |||
| #endif | |||
| 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; | |||
| // 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(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) | |||
| { | |||
| @@ -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_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 | |||
| # define CARLA_DECLARE_NON_COPY_CLASS(ClassName) \ | |||
| # define CARLA_DECLARE_NON_COPYABLE(ClassName) \ | |||
| private: \ | |||
| ClassName(ClassName&) = delete; \ | |||
| ClassName(const ClassName&) = delete; \ | |||
| ClassName& operator=(ClassName&) = delete; \ | |||
| ClassName& operator=(const ClassName&) = delete; | |||
| #else | |||
| # define CARLA_DECLARE_NON_COPY_CLASS(ClassName) \ | |||
| # define CARLA_DECLARE_NON_COPYABLE(ClassName) \ | |||
| private: \ | |||
| ClassName(ClassName&); \ | |||
| ClassName(const ClassName&); \ | |||
| @@ -234,17 +234,6 @@ private: \ | |||
| ClassName& operator=(const ClassName&); | |||
| #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 */ | |||
| #ifdef CARLA_PROPER_CPP11_SUPPORT | |||
| # define CARLA_PREVENT_HEAP_ALLOCATION \ | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -65,9 +65,9 @@ struct NativePluginPresetManager { | |||
| { | |||
| 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()); | |||
| } | |||
| } | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * 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 | |||
| @@ -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 | |||
| @@ -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 | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * 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 | |||
| @@ -399,7 +399,7 @@ struct LV2_RDF_PortScalePoint { | |||
| } | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_PortScalePoint) | |||
| CARLA_DECLARE_NON_COPYABLE(LV2_RDF_PortScalePoint) | |||
| }; | |||
| // 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 | |||
| @@ -493,7 +493,7 @@ struct LV2_RDF_PortGroup { | |||
| } | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_PortGroup) | |||
| CARLA_DECLARE_NON_COPYABLE(LV2_RDF_PortGroup) | |||
| }; | |||
| // Parameter | |||
| @@ -568,7 +568,7 @@ struct LV2_RDF_Parameter { | |||
| other.Unit.Symbol = nullptr; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_Parameter) | |||
| CARLA_DECLARE_NON_COPYABLE(LV2_RDF_Parameter) | |||
| }; | |||
| // 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 | |||
| @@ -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 | |||
| @@ -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 | |||
| @@ -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 | |||
| @@ -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 | |||
| @@ -59,7 +59,7 @@ struct ScopedLibOpen { | |||
| return slo; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(ScopedLibOpen); | |||
| CARLA_DECLARE_NON_COPYABLE(ScopedLibOpen); | |||
| }; | |||
| // -------------------------------------------------------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * 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); | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(WineBridge); | |||
| CARLA_DECLARE_NON_COPYABLE(WineBridge); | |||
| }; | |||
| #endif // __WINE__ && ! JACKBRIDGE_DIRECT | |||
| @@ -74,7 +74,7 @@ private: | |||
| jackbridge_exported_function_type func; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(JackBridgeExported); | |||
| CARLA_DECLARE_NON_COPYABLE(JackBridgeExported); | |||
| }; | |||
| // ----------------------------------------------------------------------------- | |||
| @@ -63,7 +63,7 @@ protected: | |||
| private: | |||
| Callback* const fCallback; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaJackRealtimeThread) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaJackRealtimeThread) | |||
| }; | |||
| // -------------------------------------------------------------------------------------------------------------------- | |||
| @@ -90,7 +90,7 @@ protected: | |||
| private: | |||
| Callback* const fCallback; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaJackNonRealtimeThread) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaJackNonRealtimeThread) | |||
| }; | |||
| // --------------------------------------------------------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -89,7 +89,7 @@ struct JackMidiPortBufferOnStack : JackMidiPortBufferBase { | |||
| isDummy = false; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(JackMidiPortBufferOnStack) | |||
| CARLA_DECLARE_NON_COPYABLE(JackMidiPortBufferOnStack) | |||
| }; | |||
| struct JackMidiPortBufferDummy : JackMidiPortBufferBase { | |||
| @@ -99,7 +99,7 @@ struct JackMidiPortBufferDummy : JackMidiPortBufferBase { | |||
| isDummy = true; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(JackMidiPortBufferDummy) | |||
| CARLA_DECLARE_NON_COPYABLE(JackMidiPortBufferDummy) | |||
| }; | |||
| struct JackPortState { | |||
| @@ -174,7 +174,7 @@ struct JackPortState { | |||
| fullname = nullptr; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(JackPortState) | |||
| CARLA_DECLARE_NON_COPYABLE(JackPortState) | |||
| }; | |||
| struct JackClientState { | |||
| @@ -289,7 +289,7 @@ struct JackClientState { | |||
| portNameMapping.clear(); | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(JackClientState) | |||
| CARLA_DECLARE_NON_COPYABLE(JackClientState) | |||
| }; | |||
| struct JackServerState { | |||
| @@ -325,7 +325,7 @@ struct JackServerState { | |||
| carla_zeroStruct(position); | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(JackServerState) | |||
| CARLA_DECLARE_NON_COPYABLE(JackServerState) | |||
| }; | |||
| CARLA_BACKEND_END_NAMESPACE | |||
| @@ -356,7 +356,7 @@ struct World { | |||
| LilvWorld* me; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(World) | |||
| CARLA_DECLARE_NON_COPYABLE(World) | |||
| }; | |||
| } /* namespace Lilv */ | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -738,7 +738,7 @@ private: | |||
| return true; | |||
| } | |||
| // CARLA_DECLARE_NON_COPY_CLASS(AudioSampleBuffer) | |||
| // CARLA_DECLARE_NON_COPYABLE(AudioSampleBuffer) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -134,8 +134,7 @@ public: | |||
| HeapBlock<ElementType> elements; | |||
| size_t numAllocated; | |||
| private: | |||
| CARLA_DECLARE_NON_COPY_CLASS (ArrayAllocationBase) | |||
| CARLA_DECLARE_NON_COPYABLE (ArrayAllocationBase) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -331,7 +331,7 @@ private: | |||
| ValueType value; | |||
| HashEntry* nextEntry; | |||
| CARLA_DECLARE_NON_COPY_CLASS (HashEntry) | |||
| CARLA_DECLARE_NON_COPYABLE (HashEntry) | |||
| }; | |||
| public: | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -340,14 +340,14 @@ public: | |||
| private: | |||
| LinkedListPointer* endOfList; | |||
| CARLA_DECLARE_NON_COPY_CLASS (Appender) | |||
| CARLA_DECLARE_NON_COPYABLE (Appender) | |||
| }; | |||
| private: | |||
| //============================================================================== | |||
| ObjectType* item; | |||
| CARLA_DECLARE_NON_COPY_CLASS (LinkedListPointer) | |||
| CARLA_DECLARE_NON_COPYABLE (LinkedListPointer) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -807,7 +807,7 @@ private: | |||
| delete data.elements [--numUsed]; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_CLASS (OwnedArray) | |||
| CARLA_DECLARE_NON_COPYABLE (OwnedArray) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -136,7 +136,7 @@ private: | |||
| friend class DirectoryIterator; | |||
| CarlaScopedPointer<Pimpl> pimpl; | |||
| CARLA_DECLARE_NON_COPY_CLASS (NativeIterator) | |||
| CARLA_DECLARE_NON_COPYABLE (NativeIterator) | |||
| }; | |||
| StringArray wildCards; | |||
| @@ -153,7 +153,7 @@ private: | |||
| static StringArray parseWildcards (const String& pattern); | |||
| static bool fileMatches (const StringArray& wildCards, const String& filename); | |||
| CARLA_DECLARE_NON_COPY_CLASS (DirectoryIterator) | |||
| CARLA_DECLARE_NON_COPYABLE (DirectoryIterator) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| 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();) | |||
| { | |||
| @@ -572,9 +572,9 @@ int File::findChildFiles (std::vector<File>& results, | |||
| 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();) | |||
| ++total; | |||
| @@ -1216,7 +1216,7 @@ private: | |||
| const String directoryWithWildCard; | |||
| HANDLE handle; | |||
| CARLA_DECLARE_NON_COPY_CLASS (Pimpl) | |||
| CARLA_DECLARE_NON_COPYABLE (Pimpl) | |||
| }; | |||
| #else | |||
| //===================================================================================================================== | |||
| @@ -1542,7 +1542,7 @@ private: | |||
| String parentDir, wildCard; | |||
| NSDirectoryEnumerator* enumerator; | |||
| CARLA_DECLARE_NON_COPY_CLASS (Pimpl) | |||
| CARLA_DECLARE_NON_COPYABLE (Pimpl) | |||
| }; | |||
| #else | |||
| static String getLinkedFile (const String& file) | |||
| @@ -1689,7 +1689,7 @@ private: | |||
| String parentDir, wildCard; | |||
| DIR* dir; | |||
| CARLA_DECLARE_NON_COPY_CLASS (Pimpl) | |||
| CARLA_DECLARE_NON_COPYABLE (Pimpl) | |||
| }; | |||
| #endif | |||
| #endif | |||
| @@ -494,10 +494,10 @@ public: | |||
| @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. | |||
| @@ -515,8 +515,8 @@ public: | |||
| @returns the number of matches found | |||
| @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. | |||
| @see isDirectory, findChildFiles | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -90,7 +90,7 @@ private: | |||
| void openHandle(); | |||
| size_t readInternal (void*, size_t); | |||
| CARLA_DECLARE_NON_COPY_CLASS (FileInputStream) | |||
| CARLA_DECLARE_NON_COPYABLE (FileInputStream) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -116,7 +116,7 @@ private: | |||
| int64 setPositionInternal (int64); | |||
| ssize_t writeInternal (const void*, size_t); | |||
| CARLA_DECLARE_NON_COPY_CLASS (FileOutputStream) | |||
| CARLA_DECLARE_NON_COPYABLE (FileOutputStream) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -164,7 +164,7 @@ private: | |||
| //============================================================================== | |||
| const File temporaryFile, targetFile; | |||
| CARLA_DECLARE_NON_COPY_CLASS (TemporaryFile) | |||
| CARLA_DECLARE_NON_COPYABLE (TemporaryFile) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -143,7 +143,7 @@ public: | |||
| private: | |||
| ByteOrder() WATER_DELETED_FUNCTION; | |||
| CARLA_DECLARE_NON_COPY_CLASS (ByteOrder) | |||
| CARLA_DECLARE_NON_COPYABLE (ByteOrder) | |||
| }; | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -254,7 +254,7 @@ private: | |||
| //============================================================================== | |||
| ElementType* data; | |||
| CARLA_DECLARE_NON_COPY_CLASS(HeapBlock) | |||
| CARLA_DECLARE_NON_COPYABLE(HeapBlock) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -126,7 +126,7 @@ private: | |||
| //============================================================================== | |||
| Atomic<int> refCount; | |||
| CARLA_DECLARE_NON_COPY_CLASS (ReferenceCountedObject) | |||
| CARLA_DECLARE_NON_COPYABLE (ReferenceCountedObject) | |||
| }; | |||
| @@ -196,7 +196,7 @@ private: | |||
| //============================================================================== | |||
| int refCount; | |||
| CARLA_DECLARE_NON_COPY_CLASS (SingleThreadedReferenceCountedObject) | |||
| CARLA_DECLARE_NON_COPYABLE (SingleThreadedReferenceCountedObject) | |||
| }; | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -222,7 +222,7 @@ public: | |||
| const MidiBuffer& buffer; | |||
| const uint8* data; | |||
| CARLA_DECLARE_NON_COPY_CLASS (Iterator) | |||
| CARLA_DECLARE_NON_COPYABLE (Iterator) | |||
| }; | |||
| /** The raw data holding this buffer. | |||
| @@ -90,7 +90,7 @@ public: | |||
| friend class MidiMessageSequence; | |||
| MidiEventHolder (const MidiMessage&); | |||
| CARLA_DECLARE_NON_COPY_CLASS(MidiEventHolder); | |||
| CARLA_DECLARE_NON_COPYABLE(MidiEventHolder); | |||
| }; | |||
| //============================================================================== | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| General Public License as published by the Free Software Foundation; | |||
| @@ -323,7 +323,7 @@ private: | |||
| uint numCVIns, numCVOuts; | |||
| uint numMIDIIns, numMIDIOuts; | |||
| CARLA_DECLARE_NON_COPY_CLASS (AudioProcessor) | |||
| CARLA_DECLARE_NON_COPYABLE (AudioProcessor) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| General Public License as published by the Free Software Foundation; | |||
| @@ -74,7 +74,7 @@ struct ClearChannelOp : public AudioGraphRenderingOp<ClearChannelOp> | |||
| const int channelNum; | |||
| 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 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 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; | |||
| CARLA_DECLARE_NON_COPY_CLASS (ClearMidiBufferOp) | |||
| CARLA_DECLARE_NON_COPYABLE (ClearMidiBufferOp) | |||
| }; | |||
| //============================================================================== | |||
| @@ -156,7 +156,7 @@ struct CopyMidiBufferOp : public AudioGraphRenderingOp<CopyMidiBufferOp> | |||
| 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; | |||
| CARLA_DECLARE_NON_COPY_CLASS (AddMidiBufferOp) | |||
| CARLA_DECLARE_NON_COPYABLE (AddMidiBufferOp) | |||
| }; | |||
| //============================================================================== | |||
| @@ -217,7 +217,7 @@ private: | |||
| int readIndex, writeIndex; | |||
| const bool isCV; | |||
| CARLA_DECLARE_NON_COPY_CLASS (DelayChannelOp) | |||
| CARLA_DECLARE_NON_COPYABLE (DelayChannelOp) | |||
| }; | |||
| //============================================================================== | |||
| @@ -306,7 +306,7 @@ private: | |||
| const uint totalCVOuts; | |||
| 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; | |||
| SortedSet<uint32> srcNodes; | |||
| CARLA_DECLARE_NON_COPY_CLASS (Entry) | |||
| CARLA_DECLARE_NON_COPYABLE (Entry) | |||
| }; | |||
| OwnedArray<Entry> entries; | |||
| @@ -1067,7 +1067,7 @@ private: | |||
| return result; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_CLASS (ConnectionLookupTable) | |||
| CARLA_DECLARE_NON_COPYABLE (ConnectionLookupTable) | |||
| }; | |||
| //============================================================================== | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| General Public License as published by the Free Software Foundation; | |||
| @@ -97,7 +97,7 @@ public: | |||
| void prepare (double newSampleRate, int newBlockSize, AudioProcessorGraph*); | |||
| void unprepare(); | |||
| CARLA_DECLARE_NON_COPY_CLASS (Node) | |||
| CARLA_DECLARE_NON_COPYABLE (Node) | |||
| }; | |||
| //============================================================================== | |||
| @@ -342,7 +342,7 @@ public: | |||
| AudioSampleBuffer& cvOutBuffer, | |||
| MidiBuffer& midiMessages); | |||
| CARLA_DECLARE_NON_COPY_CLASS (AudioGraphIOProcessor) | |||
| CARLA_DECLARE_NON_COPYABLE (AudioGraphIOProcessor) | |||
| }; | |||
| //============================================================================== | |||
| @@ -394,7 +394,7 @@ public: | |||
| void buildRenderingSequence(); | |||
| bool isAnInputTo (uint32 possibleInputId, uint32 possibleDestinationId, int recursionCheck) const; | |||
| CARLA_DECLARE_NON_COPY_CLASS (AudioProcessorGraph) | |||
| CARLA_DECLARE_NON_COPYABLE (AudioProcessorGraph) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -53,7 +53,7 @@ private: | |||
| //============================================================================== | |||
| const File file; | |||
| CARLA_DECLARE_NON_COPY_CLASS (FileInputSource) | |||
| CARLA_DECLARE_NON_COPYABLE (FileInputSource) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -259,7 +259,7 @@ protected: | |||
| InputStream() noexcept {} | |||
| private: | |||
| CARLA_DECLARE_NON_COPY_CLASS (InputStream) | |||
| CARLA_DECLARE_NON_COPYABLE (InputStream) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -93,7 +93,7 @@ private: | |||
| void createInternalCopy(); | |||
| CARLA_DECLARE_NON_COPY_CLASS (MemoryInputStream) | |||
| CARLA_DECLARE_NON_COPYABLE (MemoryInputStream) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -128,7 +128,7 @@ private: | |||
| void trimExternalBlockSize(); | |||
| 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. */ | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -237,7 +237,7 @@ private: | |||
| //============================================================================== | |||
| String newLineString; | |||
| CARLA_DECLARE_NON_COPY_CLASS (OutputStream) | |||
| CARLA_DECLARE_NON_COPYABLE (OutputStream) | |||
| }; | |||
| //============================================================================== | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -117,7 +117,7 @@ public: | |||
| private: | |||
| PROCESS_INFORMATION processInfo; | |||
| CARLA_DECLARE_NON_COPY_CLASS (ActiveProcess) | |||
| CARLA_DECLARE_NON_COPYABLE (ActiveProcess) | |||
| }; | |||
| #else | |||
| class ChildProcess::ActiveProcess | |||
| @@ -271,7 +271,7 @@ public: | |||
| int childPID; | |||
| private: | |||
| CARLA_DECLARE_NON_COPY_CLASS (ActiveProcess) | |||
| CARLA_DECLARE_NON_COPYABLE (ActiveProcess) | |||
| }; | |||
| #endif | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -105,7 +105,7 @@ private: | |||
| class ActiveProcess; | |||
| CarlaScopedPointer<ActiveProcess> activeProcess; | |||
| CARLA_DECLARE_NON_COPY_CLASS (ChildProcess) | |||
| CARLA_DECLARE_NON_COPYABLE (ChildProcess) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -82,7 +82,7 @@ private: | |||
| //============================================================================== | |||
| const LockType& lock_; | |||
| CARLA_DECLARE_NON_COPY_CLASS (GenericScopedLock) | |||
| CARLA_DECLARE_NON_COPYABLE (GenericScopedLock) | |||
| }; | |||
| @@ -155,7 +155,7 @@ private: | |||
| //============================================================================== | |||
| const LockType& lock_; | |||
| CARLA_DECLARE_NON_COPY_CLASS (GenericScopedUnlock) | |||
| CARLA_DECLARE_NON_COPYABLE (GenericScopedUnlock) | |||
| }; | |||
| @@ -230,7 +230,7 @@ private: | |||
| const LockType& lock_; | |||
| const bool lockWasSuccessful; | |||
| CARLA_DECLARE_NON_COPY_CLASS (GenericScopedTryLock) | |||
| CARLA_DECLARE_NON_COPYABLE (GenericScopedTryLock) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -102,7 +102,7 @@ private: | |||
| //============================================================================== | |||
| mutable Atomic<int> lock; | |||
| CARLA_DECLARE_NON_COPY_CLASS (SpinLock) | |||
| CARLA_DECLARE_NON_COPYABLE (SpinLock) | |||
| }; | |||
| } | |||
| @@ -3,7 +3,7 @@ | |||
| This file is part of the Water library. | |||
| 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 | |||
| http://www.isc.org/downloads/software-support-policy/isc-license/ | |||
| @@ -176,7 +176,7 @@ private: | |||
| String expandExternalEntity (const String&); | |||
| String getParameterEntity (const String&); | |||
| CARLA_DECLARE_NON_COPY_CLASS (XmlDocument) | |||
| CARLA_DECLARE_NON_COPYABLE (XmlDocument) | |||
| }; | |||
| } | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -220,7 +220,7 @@ struct AudioFilePool { | |||
| return true; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(AudioFilePool) | |||
| CARLA_DECLARE_NON_COPYABLE(AudioFilePool) | |||
| }; | |||
| class AudioFileReader | |||
| @@ -862,7 +862,7 @@ private: | |||
| #endif | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(AudioFileReader) | |||
| CARLA_DECLARE_NON_COPYABLE(AudioFileReader) | |||
| }; | |||
| #endif // AUDIO_BASE_HPP_INCLUDED | |||
| @@ -751,7 +751,7 @@ private: | |||
| } | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(InlineDisplay) | |||
| CARLA_DECLARE_NON_COPYABLE(InlineDisplay) | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| } fInlineDisplay; | |||
| #endif | |||
| @@ -319,12 +319,12 @@ private: | |||
| } | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(InlineDisplay) | |||
| CARLA_DECLARE_NON_COPYABLE(InlineDisplay) | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| } fInlineDisplay; | |||
| PluginClassEND(BigMeterPlugin) | |||
| CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(BigMeterPlugin) | |||
| CARLA_DECLARE_NON_COPYABLE(BigMeterPlugin) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -1 +1 @@ | |||
| Subproject commit 45a2d5b0a268180b4304ce27f22abbd3f8d5073c | |||
| Subproject commit f69a9e9abdc03e9d124656215839c0fe025a783a | |||
| @@ -319,7 +319,7 @@ private: | |||
| } | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(UI); | |||
| CARLA_DECLARE_NON_COPYABLE(UI); | |||
| } fUI; | |||
| // ---------------------------------------------------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -408,7 +408,7 @@ public: | |||
| if (kIsUsingUILauncher) | |||
| { | |||
| destoryUILauncher(fUiLauncher); | |||
| fUiLauncher = createUILauncher((intptr_t)ptr, fDescriptor, fHandle); | |||
| fUiLauncher = createUILauncher((uintptr_t)ptr, fDescriptor, fHandle); | |||
| } | |||
| else | |||
| { | |||
| @@ -871,7 +871,7 @@ private: | |||
| carla_zeroStructs(mdata, kMaxMidiEvents); | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(FixedVstEvents); | |||
| CARLA_DECLARE_NON_COPYABLE(FixedVstEvents); | |||
| } fMidiOutEvents; | |||
| char* fStateChunk; | |||
| @@ -115,7 +115,7 @@ private: | |||
| const NativePluginHandle handle; | |||
| PluginWindow& pluginWindow; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaButtonWidget); | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaButtonWidget); | |||
| }; | |||
| END_NAMESPACE_DGL | |||
| @@ -88,7 +88,7 @@ private: | |||
| CarlaStylePrivate* const d; | |||
| friend class CarlaStylePrivate; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaStyle); | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaStyle); | |||
| }; | |||
| #endif // CARLA_STYLE_HPP_INCLUDED | |||
| @@ -41,7 +41,7 @@ public: | |||
| QStringList keys() const override; | |||
| #endif | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaStylePlugin); | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaStylePlugin); | |||
| }; | |||
| #endif // CARLA_STYLE_PLUGIN_HPP_INCLUDED | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -66,7 +66,7 @@ private: | |||
| bool fLoadedOk; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaMagic) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaMagic) | |||
| }; | |||
| #endif | |||
| @@ -256,7 +256,7 @@ struct BridgeAudioPool { | |||
| 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() 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 | |||
| 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; | |||
| bool writeOpcode(const PluginBridgeNonRtServerOpcode opcode) noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(BridgeNonRtServerControl) | |||
| CARLA_DECLARE_NON_COPYABLE(BridgeNonRtServerControl) | |||
| }; | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| @@ -47,16 +47,20 @@ const char* find_dssi_ui(const char* const filename, const char* const label) no | |||
| 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; | |||
| } | |||
| } | |||
| } | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -225,7 +225,7 @@ private: | |||
| CarlaEngine::ProtectedData* const pData; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(ScopedEngineEnvironmentLocker) | |||
| CARLA_DECLARE_NON_COPYABLE(ScopedEngineEnvironmentLocker) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -22,16 +22,10 @@ | |||
| #include "CarlaDefines.h" | |||
| #include "CarlaBackend.h" | |||
| #include "CarlaUtils.hpp" | |||
| #include "CarlaString.hpp" | |||
| #include "CarlaBase64Utils.hpp" | |||
| #include "CarlaJuceUtils.hpp" | |||
| #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 | |||
| # 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) | |||
| { | |||
| @@ -55,46 +48,51 @@ public: | |||
| carla_stdout("%s: %s", ysfx_log_level_string(level), message); | |||
| break; | |||
| case ysfx_log_warning: | |||
| case ysfx_log_error: | |||
| carla_stderr("%s: %s", ysfx_log_level_string(level), message); | |||
| 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) | |||
| { | |||
| case ysfx_log_info: | |||
| break; | |||
| case ysfx_log_warning: | |||
| case ysfx_log_error: | |||
| carla_stderr("%s: %s", ysfx_log_level_string(level), message); | |||
| 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) | |||
| { | |||
| 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; | |||
| @@ -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 | |||
| { | |||
| 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 | |||
| fFileId.replaceCharacter('\\', '/'); | |||
| fileId.replaceCharacter('\\', '/'); | |||
| #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(); | |||
| } | |||
| 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: | |||
| water::File fRootPath; | |||
| water::String fFileId; | |||
| water::String fFilePath; | |||
| water::String fRootPath; | |||
| }; | |||
| // -------------------------------------------------------------------------------------------------------------------- | |||
| @@ -57,13 +57,13 @@ | |||
| ::LeakedObjectDetector<ClassName> CARLA_JOIN_MACRO(leakDetector_, 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) | |||
| #else | |||
| /** Don't use leak detection on release builds. */ | |||
| # define CARLA_LEAK_DETECTOR(ClassName) | |||
| # define CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \ | |||
| CARLA_DECLARE_NON_COPY_CLASS(ClassName) | |||
| CARLA_DECLARE_NON_COPYABLE(ClassName) | |||
| #endif | |||
| //===================================================================================================================== | |||
| @@ -215,7 +215,7 @@ private: | |||
| #endif | |||
| //CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaLogThread) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaLogThread) | |||
| }; | |||
| #ifdef CARLA_OS_WIN | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -550,7 +550,7 @@ public: | |||
| } | |||
| 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; | |||
| // Rest of host<->plugin support | |||
| @@ -1669,7 +1669,7 @@ private: | |||
| // ---------------------------------------------------------------------------------------------------------------- | |||
| CARLA_DECLARE_NON_COPY_STRUCT(Lv2PluginBaseClass) | |||
| CARLA_DECLARE_NON_COPYABLE(Lv2PluginBaseClass) | |||
| }; | |||
| // -------------------------------------------------------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -97,7 +97,7 @@ private: | |||
| mutable pthread_mutex_t fMutex; | |||
| 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; | |||
| #endif | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaRecursiveMutex) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaRecursiveMutex) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -266,7 +266,7 @@ private: | |||
| volatile bool fTriggered; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaSignal) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaSignal) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -291,7 +291,7 @@ private: | |||
| const Mutex& fMutex; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaScopeLocker) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaScopeLocker) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -335,7 +335,7 @@ private: | |||
| const bool fLocked; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaScopeTryLocker) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaScopeTryLocker) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -360,7 +360,7 @@ private: | |||
| const Mutex& fMutex; | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaScopeUnlocker) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaScopeUnlocker) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -105,7 +105,7 @@ struct CarlaOscData { | |||
| #endif | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_STRUCT(CarlaOscData) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaOscData) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -632,7 +632,7 @@ struct CarlaPipeCommon::PrivateData { | |||
| carla_zeroChars(tmpBuf, 0xffff); | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT(PrivateData) | |||
| CARLA_DECLARE_NON_COPYABLE(PrivateData) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -1165,7 +1165,7 @@ bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* cons | |||
| ~ScopedDisplay() { if (display!=nullptr) XCloseDisplay(display); } | |||
| // c++ compat stuff | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(ScopedDisplay) | |||
| CARLA_DECLARE_NON_COPYABLE(ScopedDisplay) | |||
| }; | |||
| struct ScopedFreeData { | |||
| union { | |||
| @@ -1177,7 +1177,7 @@ bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* cons | |||
| ~ScopedFreeData() { XFree(data); } | |||
| // c++ compat stuff | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(ScopedFreeData) | |||
| CARLA_DECLARE_NON_COPYABLE(ScopedFreeData) | |||
| }; | |||
| const ScopedDisplay sd; | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -74,7 +74,7 @@ protected: | |||
| fIsResizable(isResizable), | |||
| fCallback(cb) {} | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaPluginUI) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaPluginUI) | |||
| }; | |||
| // ----------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -116,7 +116,7 @@ private: | |||
| static void sig_handler(const int signum); | |||
| #endif | |||
| CARLA_DECLARE_NON_COPY_CLASS(ScopedAbortCatcher) | |||
| CARLA_DECLARE_NON_COPYABLE(ScopedAbortCatcher) | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| }; | |||
| @@ -133,7 +133,7 @@ private: | |||
| struct ::sigaction sigs[16]; | |||
| #endif | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaSignalRestorer) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaSignalRestorer) | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| }; | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -443,7 +443,7 @@ private: | |||
| bool fErrorWriting; | |||
| CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaRingBufferControl) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaRingBufferControl) | |||
| }; | |||
| template <class BufferStruct> | |||
| @@ -509,7 +509,7 @@ private: | |||
| HeapBuffer fHeapBuffer; | |||
| CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaHeapRingBuffer) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaHeapRingBuffer) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -528,7 +528,7 @@ private: | |||
| SmallStackBuffer fStackBuffer; | |||
| CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaSmallStackRingBuffer) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaSmallStackRingBuffer) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -89,7 +89,7 @@ private: | |||
| const char* key; | |||
| const char* origValue; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaScopedEnvVar) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaScopedEnvVar) | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| }; | |||
| @@ -149,7 +149,7 @@ private: | |||
| const char* const oldloc; | |||
| #endif | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaScopedLocale) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaScopedLocale) | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| }; | |||
| @@ -391,7 +391,7 @@ private: | |||
| ValueType& value; | |||
| const ValueType originalValue; | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaScopedValueSetter) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaScopedValueSetter) | |||
| CARLA_PREVENT_HEAP_ALLOCATION | |||
| }; | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -45,7 +45,7 @@ struct CarlaStateSave { | |||
| Parameter() noexcept; | |||
| ~Parameter() noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(Parameter) | |||
| CARLA_DECLARE_NON_COPYABLE(Parameter) | |||
| }; | |||
| typedef LinkedList<Parameter*> ParameterList; | |||
| @@ -60,7 +60,7 @@ struct CarlaStateSave { | |||
| ~CustomData() noexcept; | |||
| bool isValid() const noexcept; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(CustomData) | |||
| CARLA_DECLARE_NON_COPYABLE(CustomData) | |||
| }; | |||
| typedef LinkedList<CustomData*> CustomDataList; | |||
| @@ -102,7 +102,7 @@ struct CarlaStateSave { | |||
| bool fillFromXmlElement(const water::XmlElement* const xmlElement); | |||
| void dumpToMemoryStream(water::MemoryOutputStream& stream) const; | |||
| CARLA_DECLARE_NON_COPY_STRUCT(CarlaStateSave) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaStateSave) | |||
| }; | |||
| static inline | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -326,7 +326,7 @@ private: | |||
| return nullptr; | |||
| } | |||
| CARLA_DECLARE_NON_COPY_CLASS(CarlaThread) | |||
| CARLA_DECLARE_NON_COPYABLE(CarlaThread) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -508,7 +508,7 @@ private: | |||
| template<typename> friend class RtLinkedList; | |||
| 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_DECLARE_NON_COPY_CLASS(LinkedList) | |||
| CARLA_DECLARE_NON_COPYABLE(LinkedList) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -213,7 +213,7 @@ private: | |||
| friend class Lv2AtomQueue; | |||
| CARLA_PREVENT_VIRTUAL_HEAP_ALLOCATION | |||
| CARLA_DECLARE_NON_COPY_CLASS(Lv2AtomRingBuffer) | |||
| CARLA_DECLARE_NON_COPYABLE(Lv2AtomRingBuffer) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -92,7 +92,7 @@ public: | |||
| mutable RtMemPool_Handle fHandle; | |||
| 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_DECLARE_NON_COPY_CLASS(RtLinkedList) | |||
| CARLA_DECLARE_NON_COPYABLE(RtLinkedList) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * 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 | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -87,7 +87,7 @@ private: | |||
| lib_t libfftw3l; | |||
| lib_t libfftw3q; | |||
| CARLA_DECLARE_NON_COPY_CLASS(ThreadSafeFFTW) | |||
| CARLA_DECLARE_NON_COPYABLE(ThreadSafeFFTW) | |||
| }; | |||
| #endif | |||