Browse Source

Fixup build with new juce

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 4 years ago
parent
commit
a40177132e
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 9 additions and 13 deletions
  1. +4
    -4
      source/backend/engine/CarlaEngineJuce.cpp
  2. +4
    -8
      source/backend/plugin/CarlaPluginJuce.cpp
  3. +1
    -1
      source/utils/JucePluginWindow.hpp

+ 4
- 4
source/backend/engine/CarlaEngineJuce.cpp View File

@@ -756,11 +756,11 @@ protected:
if (! midiIns.contains(portName))
return false;

juce::MidiInput* const juceMidiIn(juce::MidiInput::openDevice(midiIns.indexOf(portName), this));
std::unique_ptr<juce::MidiInput> juceMidiIn(juce::MidiInput::openDevice(midiIns.indexOf(portName), this));
juceMidiIn->start();

MidiInPort midiPort;
midiPort.port = juceMidiIn;
midiPort.port = juceMidiIn.release();

std::strncpy(midiPort.name, portName, STR_MAX);
midiPort.name[STR_MAX] = '\0';
@@ -775,11 +775,11 @@ protected:
if (! midiOuts.contains(portName))
return false;

juce::MidiOutput* const juceMidiOut(juce::MidiOutput::openDevice(midiOuts.indexOf(portName)));
std::unique_ptr<juce::MidiOutput> juceMidiOut(juce::MidiOutput::openDevice(midiOuts.indexOf(portName)));
juceMidiOut->startBackgroundThread();

MidiOutPort midiPort;
midiPort.port = juceMidiOut;
midiPort.port = juceMidiOut.release();

std::strncpy(midiPort.name, portName, STR_MAX);
midiPort.name[STR_MAX] = '\0';


+ 4
- 8
source/backend/plugin/CarlaPluginJuce.cpp View File

@@ -40,6 +40,7 @@
# endif
#endif

#define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1
#include "AppConfig.h"
#include "juce_audio_processors/juce_audio_processors.h"
#include "juce_gui_basics/juce_gui_basics.h"
@@ -67,8 +68,8 @@ public:
CarlaPluginJuce(CarlaEngine* const engine, const uint id)
: CarlaPlugin(engine, id),
fDesc(),
fInstance(nullptr),
fFormatManager(),
fInstance(),
fAudioBuffer(),
fMidiBuffer(),
fPosInfo(),
@@ -103,12 +104,7 @@ public:
pData->active = false;
}

if (fInstance != nullptr)
{
delete fInstance;
fInstance = nullptr;
}

fInstance = nullptr;
clearBuffers();
}

@@ -1407,8 +1403,8 @@ public:

private:
juce::PluginDescription fDesc;
juce::AudioPluginInstance* fInstance;
juce::AudioPluginFormatManager fFormatManager;
std::unique_ptr<juce::AudioPluginInstance> fInstance;

juce::AudioSampleBuffer fAudioBuffer;
juce::MidiBuffer fMidiBuffer;


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

@@ -99,7 +99,7 @@ private:
return;

#if defined(CARLA_OS_LINUX) && defined(HAVE_X11)
Display* const display = XWindowSystem::getInstance()->displayRef();
Display* const display = XWindowSystem::getInstance()->getDisplay();
CARLA_SAFE_ASSERT_RETURN(display != nullptr,);

::Window window = (::Window)getWindowHandle();


Loading…
Cancel
Save