Browse Source

Cleaup; Adjust bridge stuff a bit more

tags/1.9.4
falkTX 10 years ago
parent
commit
794f979c10
10 changed files with 35 additions and 16 deletions
  1. +8
    -0
      source/Makefile.mk
  2. +1
    -1
      source/backend/engine/CarlaEngineJack.cpp
  3. +1
    -1
      source/backend/plugin/DssiPlugin.cpp
  4. +11
    -1
      source/backend/plugin/JucePlugin.cpp
  5. +1
    -1
      source/bridges-plugin/Makefile
  6. +1
    -1
      source/includes/CarlaDefines.h
  7. +8
    -3
      source/modules/jackbridge/JackBridge.hpp
  8. +0
    -3
      source/modules/jackbridge/JackBridge1.cpp
  9. +0
    -2
      source/modules/jackbridge/Makefile
  10. +4
    -3
      source/utils/JucePluginWindow.hpp

+ 8
- 0
source/Makefile.mk View File

@@ -82,6 +82,9 @@ endif

ifeq ($(DEBUG),true)
BASE_FLAGS += -DDEBUG -O0 -g
ifeq ($(WIN32),true)
BASE_FLAGS += -msse -msse2
endif
LINK_OPTS =
else
BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
@@ -131,11 +134,16 @@ ifeq ($(MACOS),true)
CFLAGS += -isystem /opt/kxstudio/include
CXXFLAGS += -isystem /opt/kxstudio/include
endif
ifeq ($(WIN64),true)
CFLAGS += -isystem /opt/mingw64/include
CXXFLAGS += -isystem /opt/mingw64/include
else
ifeq ($(WIN32),true)
CFLAGS += -isystem /opt/mingw32/include
CXXFLAGS += -isystem /opt/mingw32/include
endif
endif
endif

# --------------------------------------------------------------
# Check for required libs


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

@@ -719,7 +719,7 @@ public:
if (pData->bufferSize == 0 || carla_compareFloats(pData->sampleRate, 0.0))
{
// open temp client to get initial buffer-size and sample-rate values
if (jack_client_t* const tmpClient = jackbridge_client_open(clientName, JackNullOption, nullptr))
if (jack_client_t* const tmpClient = jackbridge_client_open(clientName, JackNoStartServer, nullptr))
{
pData->bufferSize = jackbridge_get_buffer_size(tmpClient);
pData->sampleRate = jackbridge_get_sample_rate(tmpClient);


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

@@ -355,7 +355,7 @@ public:
const ScopedSingleProcessLocker spl(this, true);

try {
fDssiDescriptor->set_custom_data(fHandle, const_cast<void*>(data), dataSize);
fDssiDescriptor->set_custom_data(fHandle, const_cast<void*>(data), static_cast<ulong>(dataSize));
} CARLA_SAFE_EXCEPTION("DssiPlugin::setChunkData");
}



+ 11
- 1
source/backend/plugin/JucePlugin.cpp View File

@@ -30,6 +30,8 @@ using namespace juce;

CARLA_BACKEND_START_NAMESPACE

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

class JucePlugin : public CarlaPlugin,
public AudioPlayHead,
public AudioProcessorListener
@@ -37,8 +39,16 @@ class JucePlugin : public CarlaPlugin,
public:
JucePlugin(CarlaEngine* const engine, const uint id)
: CarlaPlugin(engine, id),
fDesc(),
fInstance(nullptr),
fAudioBuffer(1, 0)
fFormatManager(),
fAudioBuffer(),
fMidiBuffer(),
fPosInfo(),
fChunk(),
fUniqueId(nullptr),
fWindow(),
leakDetector_JucePlugin()
{
carla_debug("JucePlugin::JucePlugin(%p, %i)", engine, id);



+ 1
- 1
source/bridges-plugin/Makefile View File

@@ -63,7 +63,7 @@ endif
# --------------------------------------------------------------
# Plugin bridges (Windows)

WIN_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS) -DJACKBRIDGE_EXPORTING
WIN_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS) -DJACKBRIDGE_EXPORTING_LATER
WIN_32BIT_FLAGS = $(32BIT_FLAGS)
WIN_64BIT_FLAGS = $(64BIT_FLAGS)
WIN_LINK_FLAGS = $(LINK_PLUGIN_FLAGS) -L../modules


+ 1
- 1
source/includes/CarlaDefines.h View File

@@ -89,7 +89,7 @@
# define P_INT64 "%I64i"
# define P_UINT64 "%I64u"
# define P_INTPTR "%I64i"
# define P_UINTPTR "%I64x"
# define P_UINTPTR "%llx"
# define P_SIZE "%I64u"
#elif defined(CARLA_OS_WIN32)
# define P_INT64 "%I64i"


+ 8
- 3
source/modules/jackbridge/JackBridge.hpp View File

@@ -18,6 +18,9 @@
#define JACKBRIDGE_HPP_INCLUDED

#ifdef __WINE__
# if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
# define __WINE64__
# endif
# undef WIN32
# undef WIN64
# undef _WIN32
@@ -28,18 +31,20 @@

#include "CarlaDefines.h"

#ifdef JACKBRIDGE_EXPORTING
#if defined(JACKBRIDGE_EXPORTING)
# if defined(CARLA_OS_WIN) && ! defined(__WINE__)
# define JACKBRIDGE_EXPORT extern "C" __declspec (dllexport)
# else
# define JACKBRIDGE_EXPORT extern "C" __attribute__ ((visibility("default")))
# endif
#else
#elif defined(JACKBRIDGE_EXPORTING_LATER)
# if defined(CARLA_OS_WIN) && ! defined(__WINE__)
# define JACKBRIDGE_EXPORT extern "C" __declspec (dllimport)
# else
# define JACKBRIDGE_EXPORT
# define JACKBRIDGE_EXPORT extern "C"
# endif
#else
# define JACKBRIDGE_EXPORT
#endif

#ifdef JACKBRIDGE_DIRECT


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

@@ -510,7 +510,6 @@ bool jackbridge_is_ok(void) noexcept
#elif defined(JACKBRIDGE_DIRECT)
return true;
#else
carla_stdout("HERE 001");
return (getBridgeInstance().lib != nullptr);
#endif
}
@@ -559,7 +558,6 @@ jack_client_t* jackbridge_client_open(const char* client_name, jack_options_t op
#elif defined(JACKBRIDGE_DIRECT)
return jack_client_open(client_name, options, status);
#else
carla_stdout("HERE 002, %s", client_name);
if (getBridgeInstance().client_open_ptr != nullptr)
return getBridgeInstance().client_open_ptr(client_name, options, status);
#endif
@@ -575,7 +573,6 @@ bool jackbridge_client_close(jack_client_t* client)
#elif defined(JACKBRIDGE_DIRECT)
return (jack_client_close(client) == 0);
#else
carla_stdout("HERE 003");
if (getBridgeInstance().client_close_ptr != nullptr)
return (getBridgeInstance().client_close_ptr(client) == 0);
#endif


+ 0
- 2
source/modules/jackbridge/Makefile View File

@@ -170,11 +170,9 @@ debug:
# --------------------------------------------------------------

%.wine32.o: %
# $(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -DJACKBRIDGE_EXPORT -c -o $@
$(WINECXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -DJACKBRIDGE_EXPORTING -c -o $@

%.wine64.o: %
# $(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -DJACKBRIDGE_EXPORT -c -o $@
$(WINECXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -DJACKBRIDGE_EXPORTING -c -o $@

# --------------------------------------------------------------


+ 4
- 3
source/utils/JucePluginWindow.hpp View File

@@ -18,7 +18,7 @@
#ifndef JUCE_PLUGIN_WINDOW_HPP_INCLUDED
#define JUCE_PLUGIN_WINDOW_HPP_INCLUDED

#include "CarlaUtils.hpp"
#include "CarlaJuceUtils.hpp"

#include "juce_gui_basics.h"

@@ -39,7 +39,8 @@ class JucePluginWindow : public DocumentWindow
public:
JucePluginWindow()
: DocumentWindow("JucePluginWindow", Colour(50, 50, 200), DocumentWindow::closeButton, false),
fClosed(false)
fClosed(false),
leakDetector_JucePluginWindow()
{
setVisible(false);
//setAlwaysOnTop(true);
@@ -104,7 +105,7 @@ protected:
private:
volatile bool fClosed;

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(JucePluginWindow)
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(JucePluginWindow)
};

} // namespace juce


Loading…
Cancel
Save