Browse Source

Misc

tags/1.9.5
falkTX 10 years ago
parent
commit
96aa94faf0
13 changed files with 66 additions and 34 deletions
  1. +1
    -0
      data/copy-juce-carla
  2. +31
    -14
      source/backend/engine/CarlaEngineGraph.cpp
  3. +2
    -2
      source/backend/engine/CarlaEngineGraph.hpp
  4. +1
    -1
      source/backend/plugin/Lv2Plugin.cpp
  5. +4
    -2
      source/modules/juce_audio_devices.h
  6. +1
    -0
      source/modules/juce_audio_processors.h
  7. +4
    -0
      source/modules/juce_core/AppConfig.h
  8. +4
    -2
      source/modules/juce_data_structures.h
  9. +4
    -6
      source/modules/juce_events.h
  10. +4
    -2
      source/modules/juce_graphics.h
  11. +4
    -2
      source/modules/juce_gui_basics.h
  12. +4
    -2
      source/modules/juce_gui_extra.h
  13. +2
    -1
      source/utils/CarlaPluginUI.cpp

+ 1
- 0
data/copy-juce-carla View File

@@ -13,3 +13,4 @@ for M in $MODULES; do
done done


find $CARLA_MODULES_DIR -name juce_module_info -delete find $CARLA_MODULES_DIR -name juce_module_info -delete
rm source/modules/juce_*/juce_*.mm

+ 31
- 14
source/backend/engine/CarlaEngineGraph.cpp View File

@@ -758,7 +758,8 @@ class CarlaPluginInstance : public AudioPluginInstance
public: public:
CarlaPluginInstance(CarlaPlugin* const plugin) CarlaPluginInstance(CarlaPlugin* const plugin)
: fPlugin(plugin), : fPlugin(plugin),
fGraph(nullptr) {}
fGraph(nullptr),
leakDetector_CarlaPluginInstance() {}


~CarlaPluginInstance() override ~CarlaPluginInstance() override
{ {
@@ -894,38 +895,41 @@ public:
private: private:
CarlaPlugin* const fPlugin; CarlaPlugin* const fPlugin;
AudioProcessorGraph* fGraph; AudioProcessorGraph* fGraph;

CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginInstance)
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// PatchbayGraph // PatchbayGraph


static const int kAudioInputNodeStart = MAX_PATCHBAY_PLUGINS*1+1;
static const int kAudioOutputNodeStart = MAX_PATCHBAY_PLUGINS*2+1;

static const int kMidiInputNodeId = MAX_PATCHBAY_PLUGINS*3+1;
static const int kMidiOutputNodeId = MAX_PATCHBAY_PLUGINS*3+2;
static const uint32_t kAudioInputNodeStart = MAX_PATCHBAY_PLUGINS*1+1;
static const uint32_t kAudioOutputNodeStart = MAX_PATCHBAY_PLUGINS*2+1;
static const uint32_t kMidiInputNodeId = MAX_PATCHBAY_PLUGINS*3+1;
static const uint32_t kMidiOutputNodeId = MAX_PATCHBAY_PLUGINS*3+2;


PatchbayGraph::PatchbayGraph(const int bufferSize, const double sampleRate, const uint32_t ins, const uint32_t outs) PatchbayGraph::PatchbayGraph(const int bufferSize, const double sampleRate, const uint32_t ins, const uint32_t outs)
: graph(), : graph(),
audioBuffer(), audioBuffer(),
midiBuffer(), midiBuffer(),
inputs(static_cast<int>(carla_fixValue(0U, MAX_PATCHBAY_PLUGINS, ins))),
outputs(static_cast<int>(carla_fixValue(0U, MAX_PATCHBAY_PLUGINS, outs))),
inputs(carla_fixValue(0U, MAX_PATCHBAY_PLUGINS, ins)),
outputs(carla_fixValue(0U, MAX_PATCHBAY_PLUGINS, outs)),
retCon() retCon()
{ {
graph.setPlayConfigDetails(inputs, outputs, sampleRate, bufferSize);
graph.setPlayConfigDetails(static_cast<int>(inputs), static_cast<int>(outputs), sampleRate, bufferSize);
graph.prepareToPlay(sampleRate, bufferSize); graph.prepareToPlay(sampleRate, bufferSize);
audioBuffer.setSize(jmax(inputs, outputs), bufferSize);

audioBuffer.setSize(static_cast<int>(jmax(inputs, outputs)), bufferSize);

midiBuffer.ensureSize(kMaxEngineEventInternalCount*2); midiBuffer.ensureSize(kMaxEngineEventInternalCount*2);
midiBuffer.clear(); midiBuffer.clear();


for (int i=0; i<inputs; ++i)
for (uint32_t i=0; i<inputs; ++i)
{ {
AudioProcessorGraph::AudioGraphIOProcessor* const proc(new AudioProcessorGraph::AudioGraphIOProcessor(AudioProcessorGraph::AudioGraphIOProcessor::audioInputNode)); AudioProcessorGraph::AudioGraphIOProcessor* const proc(new AudioProcessorGraph::AudioGraphIOProcessor(AudioProcessorGraph::AudioGraphIOProcessor::audioInputNode));
graph.addNode(proc, kAudioInputNodeStart+i); graph.addNode(proc, kAudioInputNodeStart+i);
} }


for (int i=0; i<outputs; ++i)
for (uint32_t i=0; i<outputs; ++i)
{ {
AudioProcessorGraph::AudioGraphIOProcessor* const proc(new AudioProcessorGraph::AudioGraphIOProcessor(AudioProcessorGraph::AudioGraphIOProcessor::audioOutputNode)); AudioProcessorGraph::AudioGraphIOProcessor* const proc(new AudioProcessorGraph::AudioGraphIOProcessor(AudioProcessorGraph::AudioGraphIOProcessor::audioOutputNode));
graph.addNode(proc, kAudioOutputNodeStart+i); graph.addNode(proc, kAudioOutputNodeStart+i);
@@ -1053,7 +1057,7 @@ void PatchbayGraph::process(CarlaEngine::ProtectedData* const data, const float*
{ {
int i=0; int i=0;


for (; i<inputs; ++i)
for (; i < static_cast<int>(inputs); ++i)
FloatVectorOperations::copy(audioBuffer.getWritePointer(i), inBuf[i], frames); FloatVectorOperations::copy(audioBuffer.getWritePointer(i), inBuf[i], frames);


// clear remaining channels // clear remaining channels
@@ -1065,7 +1069,7 @@ void PatchbayGraph::process(CarlaEngine::ProtectedData* const data, const float*


// put juce audio in carla buffer // put juce audio in carla buffer
{ {
for (int i=0; i<outputs; ++i)
for (int i=0; i < static_cast<int>(outputs); ++i)
FloatVectorOperations::copy(outBuf[i], audioBuffer.getReadPointer(i), frames); FloatVectorOperations::copy(outBuf[i], audioBuffer.getReadPointer(i), frames);
} }


@@ -1340,3 +1344,16 @@ void CarlaEngine::restorePatchbayConnection(const char* const connSource, const
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


CARLA_BACKEND_END_NAMESPACE CARLA_BACKEND_END_NAMESPACE

// -----------------------------------------------------------------------
// need to build juce_audio_processors on non-win/mac OSes

#if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
# include "juce_audio_processors.h"
namespace juce {
# include "juce_audio_processors/processors/juce_AudioProcessor.cpp"
# include "juce_audio_processors/processors/juce_AudioProcessorGraph.cpp"
}
#endif

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

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

@@ -116,8 +116,8 @@ struct PatchbayGraph {
AudioProcessorGraph graph; AudioProcessorGraph graph;
AudioSampleBuffer audioBuffer; AudioSampleBuffer audioBuffer;
MidiBuffer midiBuffer; MidiBuffer midiBuffer;
const int inputs;
const int outputs;
const uint32_t inputs;
const uint32_t outputs;
mutable CharStringListPtr retCon; mutable CharStringListPtr retCon;


PatchbayGraph(const int bufferSize, const double sampleRate, const uint32_t inputs, const uint32_t outputs); PatchbayGraph(const int bufferSize, const double sampleRate, const uint32_t inputs, const uint32_t outputs);


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

@@ -4290,7 +4290,7 @@ public:
carla_stdout("Lv2Plugin::handlePluginUIResized(%u, %u)", width, height); carla_stdout("Lv2Plugin::handlePluginUIResized(%u, %u)", width, height);


if (fUI.handle != nullptr && fExt.uiresize != nullptr) if (fUI.handle != nullptr && fExt.uiresize != nullptr)
fExt.uiresize->ui_resize(fUI.handle, width, height);
fExt.uiresize->ui_resize(fUI.handle, static_cast<int>(width), static_cast<int>(height));
} }


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


+ 4
- 2
source/modules/juce_audio_devices.h View File

@@ -22,7 +22,9 @@
#include "juce_audio_basics.h" #include "juce_audio_basics.h"
#include "juce_audio_formats.h" #include "juce_audio_formats.h"


#include "juce_audio_devices/AppConfig.h"
#include "juce_audio_devices/juce_audio_devices.h"
#if JUCE_MAC || JUCE_WINDOWS
# include "juce_audio_devices/AppConfig.h"
# include "juce_audio_devices/juce_audio_devices.h"
#endif


#endif // CARLA_JUCE_AUDIO_DEVICES_H_INCLUDED #endif // CARLA_JUCE_AUDIO_DEVICES_H_INCLUDED

+ 1
- 0
source/modules/juce_audio_processors.h View File

@@ -21,6 +21,7 @@
#include "juce_gui_basics.h" #include "juce_gui_basics.h"
#include "juce_audio_basics.h" #include "juce_audio_basics.h"


// patched to not use gui on non-win/mac
#include "juce_audio_processors/AppConfig.h" #include "juce_audio_processors/AppConfig.h"
#include "juce_audio_processors/juce_audio_processors.h" #include "juce_audio_processors/juce_audio_processors.h"




+ 4
- 0
source/modules/juce_core/AppConfig.h View File

@@ -69,6 +69,10 @@
#define JUCE_USE_VFORK 1 #define JUCE_USE_VFORK 1
#if ! (JUCE_MAC || JUCE_WINDOWS)
# define JUCE_AUDIO_PROCESSOR_DISABLE_GUI 1
#endif
// always enabled // always enabled
#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 #define JUCE_MODULE_AVAILABLE_juce_audio_basics 1
#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 #define JUCE_MODULE_AVAILABLE_juce_audio_formats 1


+ 4
- 2
source/modules/juce_data_structures.h View File

@@ -20,7 +20,9 @@


#include "juce_events.h" #include "juce_events.h"


#include "juce_data_structures/AppConfig.h"
#include "juce_data_structures/juce_data_structures.h"
#if JUCE_MAC || JUCE_WINDOWS
# include "juce_data_structures/AppConfig.h"
# include "juce_data_structures/juce_data_structures.h"
#endif


#endif // CARLA_JUCE_DATA_STRUCTURES_H_INCLUDED #endif // CARLA_JUCE_DATA_STRUCTURES_H_INCLUDED

+ 4
- 6
source/modules/juce_events.h View File

@@ -18,13 +18,11 @@
#ifndef CARLA_JUCE_EVENTS_H_INCLUDED #ifndef CARLA_JUCE_EVENTS_H_INCLUDED
#define CARLA_JUCE_EVENTS_H_INCLUDED #define CARLA_JUCE_EVENTS_H_INCLUDED


#if ! (JUCE_MAC || JUCE_WINDOWS)
# error Don't want juce_events with the current setup
#endif

#include "juce_core.h" #include "juce_core.h"


#include "juce_events/AppConfig.h"
#include "juce_events/juce_events.h"
#if JUCE_MAC || JUCE_WINDOWS
# include "juce_events/AppConfig.h"
# include "juce_events/juce_events.h"
#endif


#endif // CARLA_JUCE_EVENTS_H_INCLUDED #endif // CARLA_JUCE_EVENTS_H_INCLUDED

+ 4
- 2
source/modules/juce_graphics.h View File

@@ -21,7 +21,9 @@
#include "juce_core.h" #include "juce_core.h"
#include "juce_events.h" #include "juce_events.h"


#include "juce_graphics/AppConfig.h"
#include "juce_graphics/juce_graphics.h"
#if JUCE_MAC || JUCE_WINDOWS
# include "juce_graphics/AppConfig.h"
# include "juce_graphics/juce_graphics.h"
#endif


#endif // CARLA_JUCE_GRAPHICS_H_INCLUDED #endif // CARLA_JUCE_GRAPHICS_H_INCLUDED

+ 4
- 2
source/modules/juce_gui_basics.h View File

@@ -21,7 +21,9 @@
#include "juce_graphics.h" #include "juce_graphics.h"
#include "juce_data_structures.h" #include "juce_data_structures.h"


#include "juce_gui_basics/AppConfig.h"
#include "juce_gui_basics/juce_gui_basics.h"
#if JUCE_MAC || JUCE_WINDOWS
# include "juce_gui_basics/AppConfig.h"
# include "juce_gui_basics/juce_gui_basics.h"
#endif


#endif // CARLA_JUCE_GUI_BASICS_H_INCLUDED #endif // CARLA_JUCE_GUI_BASICS_H_INCLUDED

+ 4
- 2
source/modules/juce_gui_extra.h View File

@@ -20,7 +20,9 @@


#include "juce_gui_basics.h" #include "juce_gui_basics.h"


#include "juce_gui_extra/AppConfig.h"
#include "juce_gui_extra/juce_gui_extra.h"
#if JUCE_MAC || JUCE_WINDOWS
# include "juce_gui_extra/AppConfig.h"
# include "juce_gui_extra/juce_gui_extra.h"
#endif


#endif // CARLA_JUCE_GUI_EXTRA_H_INCLUDED #endif // CARLA_JUCE_GUI_EXTRA_H_INCLUDED

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

@@ -183,7 +183,8 @@ public:
CARLA_SAFE_ASSERT_CONTINUE(fCallback != nullptr); CARLA_SAFE_ASSERT_CONTINUE(fCallback != nullptr);
CARLA_SAFE_ASSERT_CONTINUE(event.xconfigure.width > 0); CARLA_SAFE_ASSERT_CONTINUE(event.xconfigure.width > 0);
CARLA_SAFE_ASSERT_CONTINUE(event.xconfigure.height > 0); CARLA_SAFE_ASSERT_CONTINUE(event.xconfigure.height > 0);
fCallback->handlePluginUIResized(event.xconfigure.width, event.xconfigure.height);
fCallback->handlePluginUIResized(static_cast<uint>(event.xconfigure.width),
static_cast<uint>(event.xconfigure.height));
break; break;


case ClientMessage: case ClientMessage:


Loading…
Cancel
Save