Browse Source

Adjust a few things

Signed-off-by: falkTX <falktx@gmail.com>
tags/v2.1-alpha1-winvst
parent
commit
9b0e7feba5
20 changed files with 127 additions and 9 deletions
  1. +0
    -1
      source/Makefile.mk
  2. +2
    -2
      source/backend/CarlaStandalone.cpp
  3. +5
    -0
      source/backend/CarlaUtils.h
  4. +2
    -2
      source/backend/engine/CarlaEngine.cpp
  5. +1
    -0
      source/backend/engine/CarlaEngineJuce.cpp
  6. +1
    -0
      source/backend/plugin/CarlaPluginJuce.cpp
  7. +48
    -3
      source/backend/utils/Information.cpp
  8. +30
    -0
      source/backend/utils/Makefile
  9. +1
    -1
      source/frontend/widgets/racklistwidget.py
  10. +18
    -0
      source/modules/AppConfig.h
  11. +2
    -0
      source/modules/juce_audio_basics/juce_audio_basics.cpp
  12. +2
    -0
      source/modules/juce_audio_devices/juce_audio_devices.cpp
  13. +2
    -0
      source/modules/juce_audio_processors/juce_audio_processors.cpp
  14. +2
    -0
      source/modules/juce_core/juce_core.cpp
  15. +2
    -0
      source/modules/juce_data_structures/juce_data_structures.cpp
  16. +2
    -0
      source/modules/juce_events/juce_events.cpp
  17. +2
    -0
      source/modules/juce_graphics/juce_graphics.cpp
  18. +2
    -0
      source/modules/juce_gui_basics/juce_gui_basics.cpp
  19. +2
    -0
      source/modules/juce_gui_extra/juce_gui_extra.cpp
  20. +1
    -0
      source/utils/JucePluginWindow.hpp

+ 0
- 1
source/Makefile.mk View File

@@ -343,7 +343,6 @@ endif


ifeq ($(USING_JUCE),true) ifeq ($(USING_JUCE),true)
BASE_FLAGS += -DUSING_JUCE BASE_FLAGS += -DUSING_JUCE
BUILD_CXX_FLAGS += -DJUCE_APP_CONFIG_HEADER='<AppConfig.h>'
endif endif


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


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

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


#ifdef USING_JUCE #ifdef USING_JUCE
// # include "AppConfig.h"
# include "AppConfig.h"
# if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) # if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
# include "juce_gui_basics/juce_gui_basics.h" # include "juce_gui_basics/juce_gui_basics.h"
# else # else


+ 5
- 0
source/backend/CarlaUtils.h View File

@@ -137,6 +137,11 @@ typedef struct _CarlaCachedPluginInfo {
*/ */
CARLA_EXPORT const char* carla_get_complete_license_text(); CARLA_EXPORT const char* carla_get_complete_license_text();


/*!
* Get the juce version used in the current Carla build.
*/
CARLA_EXPORT const char* carla_get_juce_version();

/*! /*!
* Get the list of supported file extensions in carla_load_file(). * Get the list of supported file extensions in carla_load_file().
*/ */


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

@@ -1039,7 +1039,7 @@ bool CarlaEngine::loadFile(const char* const filename)
extension == "mp3" || extension == "mp3" ||
extension == "mpc" || extension == "mpc" ||
extension == "wma" || extension == "wma" ||
# ifdef HAVE_SNDFILE
# ifndef HAVE_SNDFILE
// FFmpeg without sndfile // FFmpeg without sndfile
extension == "flac" || extension == "flac" ||
extension == "oga" || extension == "oga" ||
@@ -1115,7 +1115,7 @@ bool CarlaEngine::loadFile(const char* const filename)
return addPlugin(getBinaryTypeFromFile(filename), PLUGIN_VST2, filename, nullptr, nullptr, 0, nullptr, 0x0); return addPlugin(getBinaryTypeFromFile(filename), PLUGIN_VST2, filename, nullptr, nullptr, 0, nullptr, 0x0);
#endif #endif


#ifdef USING_JUCE
#if defined(USING_JUCE) && (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
if (extension == "vst3") if (extension == "vst3")
return addPlugin(getBinaryTypeFromFile(filename), PLUGIN_VST3, filename, nullptr, nullptr, 0, nullptr, 0x0); return addPlugin(getBinaryTypeFromFile(filename), PLUGIN_VST3, filename, nullptr, nullptr, 0, nullptr, 0x0);
#endif #endif


+ 1
- 0
source/backend/engine/CarlaEngineJuce.cpp View File

@@ -22,6 +22,7 @@


#include "RtLinkedList.hpp" #include "RtLinkedList.hpp"


#include "AppConfig.h"
#include "juce_audio_devices/juce_audio_devices.h" #include "juce_audio_devices/juce_audio_devices.h"


CARLA_BACKEND_START_NAMESPACE CARLA_BACKEND_START_NAMESPACE


+ 1
- 0
source/backend/plugin/CarlaPluginJuce.cpp View File

@@ -24,6 +24,7 @@
#include "CarlaMathUtils.hpp" #include "CarlaMathUtils.hpp"
#include "JucePluginWindow.hpp" #include "JucePluginWindow.hpp"


#include "AppConfig.h"
#include "juce_audio_processors/juce_audio_processors.h" #include "juce_audio_processors/juce_audio_processors.h"


namespace juce { namespace juce {


+ 48
- 3
source/backend/utils/Information.cpp View File

@@ -26,6 +26,11 @@
# include <fluidsynth.h> # include <fluidsynth.h>
#endif #endif


#ifdef USING_JUCE
# include "AppConfig.h"
# include "juce_core/juce_core.h"
#endif

#include "water/files/File.h" #include "water/files/File.h"


// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
@@ -46,7 +51,14 @@ const char* carla_get_complete_license_text()
"<li>LADSPA plugin support</li>" "<li>LADSPA plugin support</li>"
"<li>DSSI plugin support</li>" "<li>DSSI plugin support</li>"
"<li>LV2 plugin support</li>" "<li>LV2 plugin support</li>"
"<li>VST2 plugin support using VeSTige header by Javier Serrano Polo</li>"
#if defined(USING_JUCE) && (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
"<li>VST2/2 plugin support (using Juce)</li>"
#else
"<li>VST2 plugin support (using VeSTige header by Javier Serrano Polo)</li>"
#endif
#if defined(USING_JUCE) && defined(CARLA_OS_MAC)
"<li>AU plugin support (using Juce)</li>"
#endif


// Sample kit libraries // Sample kit libraries
#ifdef HAVE_FLUIDSYNTH #ifdef HAVE_FLUIDSYNTH
@@ -59,7 +71,9 @@ const char* carla_get_complete_license_text()
"<li>liblo library for OSC support</li>" "<li>liblo library for OSC support</li>"
"<li>rtmempool library by Nedko Arnaudov" "<li>rtmempool library by Nedko Arnaudov"
"<li>serd, sord, sratom and lilv libraries for LV2 discovery</li>" "<li>serd, sord, sratom and lilv libraries for LV2 discovery</li>"
#ifndef USING_JUCE
"<li>RtAudio v" RTAUDIO_VERSION " and RtMidi v" RTMIDI_VERSION " for native Audio and MIDI support</li>" "<li>RtAudio v" RTAUDIO_VERSION " and RtMidi v" RTMIDI_VERSION " for native Audio and MIDI support</li>"
#endif


// Internal plugins // Internal plugins
"<li>MIDI Sequencer UI code by Perry Nguyen</li>" "<li>MIDI Sequencer UI code by Perry Nguyen</li>"
@@ -80,6 +94,25 @@ const char* carla_get_complete_license_text()
return retText; return retText;
} }


const char* carla_get_juce_version()
{
carla_debug("carla_get_juce_version()");

static CarlaString retVersion;

#ifdef USING_JUCE
if (retVersion.isEmpty())
{
if (const char* const version = juce::SystemStats::getJUCEVersion().toRawUTF8())
retVersion = version+6;
else
retVersion = "Unknown";
}
#endif

return retVersion;
}

const char* const* carla_get_supported_file_extensions() const char* const* carla_get_supported_file_extensions()
{ {
carla_debug("carla_get_supported_file_extensions()"); carla_debug("carla_get_supported_file_extensions()");
@@ -96,12 +129,15 @@ const char* const* carla_get_supported_file_extensions()
#ifdef HAVE_ZYN_DEPS #ifdef HAVE_ZYN_DEPS
"xmz", "xiz", "xmz", "xiz",
#endif #endif
#if defined(CARLA_OS_MAC)
#ifdef CARLA_OS_MAC
"vst", "vst",
#else #else
"dll", "dll",
"so", "so",
#endif #endif
#if defined(USING_JUCE) && (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
"vst3",
#endif


// Audio files // Audio files
#ifdef HAVE_SNDFILE #ifdef HAVE_SNDFILE
@@ -110,7 +146,7 @@ const char* const* carla_get_supported_file_extensions()
#endif #endif
#ifdef HAVE_FFMPEG #ifdef HAVE_FFMPEG
"3g2", "3gp", "aac", "ac3", "amr", "ape", "mp2", "mp3", "mpc", "wma", "3g2", "3gp", "aac", "ac3", "amr", "ape", "mp2", "mp3", "mpc", "wma",
# ifdef HAVE_SNDFILE
# ifndef HAVE_SNDFILE
// FFmpeg without sndfile // FFmpeg without sndfile
"flac", "oga", "ogg", "w64", "wav", "flac", "oga", "ogg", "w64", "wav",
# endif # endif
@@ -148,6 +184,15 @@ const char* const* carla_get_supported_features()
#endif #endif
#ifdef HAVE_PYQT #ifdef HAVE_PYQT
"gui", "gui",
#endif
#ifdef USING_JUCE
"juce",
# if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
"vst3",
# endif
# if defined(CARLA_OS_MAC)
"au",
# endif
#endif #endif
nullptr nullptr
}; };


+ 30
- 0
source/backend/utils/Makefile View File

@@ -23,6 +23,21 @@ TARGETS = $(BINDIR)/libcarla_utils$(LIB_EXT)
LIBS = $(MODULEDIR)/lilv.a LIBS = $(MODULEDIR)/lilv.a
LIBS += $(MODULEDIR)/water.files.a LIBS += $(MODULEDIR)/water.files.a


ifeq ($(USING_JUCE),true)
LIBS += $(MODULEDIR)/juce_audio_basics.a
LIBS += $(MODULEDIR)/juce_audio_processors.a
LIBS += $(MODULEDIR)/juce_core.a
LIBS += $(MODULEDIR)/juce_data_structures.a
LIBS += $(MODULEDIR)/juce_events.a
ifeq ($(MACOS_OR_WIN32),true)
LIBS += $(MODULEDIR)/juce_graphics.a
LIBS += $(MODULEDIR)/juce_gui_basics.a
endif
ifeq ($(MACOS),true)
LIBS += $(MODULEDIR)/juce_gui_extra.a
endif
endif

LINK_FLAGS += $(LILV_LIBS) LINK_FLAGS += $(LILV_LIBS)
LINK_FLAGS += $(WATER_LIBS) LINK_FLAGS += $(WATER_LIBS)


@@ -34,6 +49,21 @@ ifneq ($(HAIKU),true)
LINK_FLAGS += -lpthread LINK_FLAGS += -lpthread
endif endif


ifeq ($(USING_JUCE),true)
LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
LINK_FLAGS += $(JUCE_CORE_LIBS)
LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
LINK_FLAGS += $(JUCE_EVENTS_LIBS)
ifeq ($(MACOS_OR_WIN32),true)
LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
endif
ifeq ($(MACOS),true)
LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
endif
endif

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


all: $(TARGETS) all: $(TARGETS)


+ 1
- 1
source/frontend/widgets/racklistwidget.py View File

@@ -258,7 +258,7 @@ class RackListWidget(QListWidget):
if os.path.isdir(filename): if os.path.isdir(filename):
#if os.path.exists(os.path.join(filename, "manifest.ttl")): #if os.path.exists(os.path.join(filename, "manifest.ttl")):
#return True #return True
if MACOS and filename.lower().endswith(".vst"):
if MACOS and filename.lower().endswith((".vst", ".vst3")):
return True return True


elif os.path.isfile(filename): elif os.path.isfile(filename):


+ 18
- 0
source/modules/AppConfig.h View File

@@ -1,7 +1,25 @@
/*
* Carla Plugin Host
* Copyright (C) 2011-2019 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
* published by the Free Software Foundation; either version 2 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/
#ifndef CARLA_JUCE_APPCONFIG_H_INCLUDED #ifndef CARLA_JUCE_APPCONFIG_H_INCLUDED
#define CARLA_JUCE_APPCONFIG_H_INCLUDED #define CARLA_JUCE_APPCONFIG_H_INCLUDED
#define JUCE_APP_CONFIG_HEADER "AppConfig.h"
// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------
// Check OS // Check OS


+ 2
- 0
source/modules/juce_audio_basics/juce_audio_basics.cpp View File

@@ -29,6 +29,8 @@
#error "Incorrect use of JUCE cpp file" #error "Incorrect use of JUCE cpp file"
#endif #endif
#include "AppConfig.h"
#include "juce_audio_basics.h" #include "juce_audio_basics.h"
#if JUCE_MINGW #if JUCE_MINGW


+ 2
- 0
source/modules/juce_audio_devices/juce_audio_devices.cpp View File

@@ -29,6 +29,8 @@
#error "Incorrect use of JUCE cpp file" #error "Incorrect use of JUCE cpp file"
#endif #endif
#include "AppConfig.h"
#define JUCE_CORE_INCLUDE_OBJC_HELPERS 1 #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
#define JUCE_CORE_INCLUDE_COM_SMART_PTR 1 #define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
#define JUCE_CORE_INCLUDE_JNI_HELPERS 1 #define JUCE_CORE_INCLUDE_JNI_HELPERS 1


+ 2
- 0
source/modules/juce_audio_processors/juce_audio_processors.cpp View File

@@ -33,6 +33,8 @@
#error "Incorrect use of JUCE cpp file" #error "Incorrect use of JUCE cpp file"
#endif #endif
#include "AppConfig.h"
#define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1 #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
#define JUCE_CORE_INCLUDE_OBJC_HELPERS 1 #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1


+ 2
- 0
source/modules/juce_core/juce_core.cpp View File

@@ -29,6 +29,8 @@
#error "Incorrect use of JUCE cpp file" #error "Incorrect use of JUCE cpp file"
#endif #endif
#include "AppConfig.h"
#define JUCE_CORE_INCLUDE_OBJC_HELPERS 1 #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
#define JUCE_CORE_INCLUDE_COM_SMART_PTR 1 #define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
#define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1 #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1


+ 2
- 0
source/modules/juce_data_structures/juce_data_structures.cpp View File

@@ -33,6 +33,8 @@
#error "Incorrect use of JUCE cpp file" #error "Incorrect use of JUCE cpp file"
#endif #endif
#include "AppConfig.h"
#include "juce_data_structures.h" #include "juce_data_structures.h"
#include "values/juce_Value.cpp" #include "values/juce_Value.cpp"


+ 2
- 0
source/modules/juce_events/juce_events.cpp View File

@@ -29,6 +29,8 @@
#error "Incorrect use of JUCE cpp file" #error "Incorrect use of JUCE cpp file"
#endif #endif
#include "AppConfig.h"
#define JUCE_CORE_INCLUDE_OBJC_HELPERS 1 #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
#define JUCE_CORE_INCLUDE_JNI_HELPERS 1 #define JUCE_CORE_INCLUDE_JNI_HELPERS 1
#define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1 #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1


+ 2
- 0
source/modules/juce_graphics/juce_graphics.cpp View File

@@ -33,6 +33,8 @@
#error "Incorrect use of JUCE cpp file" #error "Incorrect use of JUCE cpp file"
#endif #endif
#include "AppConfig.h"
#define JUCE_CORE_INCLUDE_OBJC_HELPERS 1 #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
#define JUCE_CORE_INCLUDE_COM_SMART_PTR 1 #define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
#define JUCE_CORE_INCLUDE_JNI_HELPERS 1 #define JUCE_CORE_INCLUDE_JNI_HELPERS 1


+ 2
- 0
source/modules/juce_gui_basics/juce_gui_basics.cpp View File

@@ -33,6 +33,8 @@
#error "Incorrect use of JUCE cpp file" #error "Incorrect use of JUCE cpp file"
#endif #endif
#include "AppConfig.h"
#define NS_FORMAT_FUNCTION(F,A) // To avoid spurious warnings from GCC #define NS_FORMAT_FUNCTION(F,A) // To avoid spurious warnings from GCC
#define JUCE_CORE_INCLUDE_OBJC_HELPERS 1 #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1


+ 2
- 0
source/modules/juce_gui_extra/juce_gui_extra.cpp View File

@@ -33,6 +33,8 @@
#error "Incorrect use of JUCE cpp file" #error "Incorrect use of JUCE cpp file"
#endif #endif
#include "AppConfig.h"
#define JUCE_CORE_INCLUDE_OBJC_HELPERS 1 #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
#define JUCE_CORE_INCLUDE_COM_SMART_PTR 1 #define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
#define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1 #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1


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

@@ -20,6 +20,7 @@


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


#include "AppConfig.h"
#include "juce_gui_basics/juce_gui_basics.h" #include "juce_gui_basics/juce_gui_basics.h"


#ifdef HAVE_X11 #ifdef HAVE_X11


Loading…
Cancel
Save