From 5882bfbe9545b29d9344bfbd46c6f5b29e4a3cfb Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 14 Mar 2014 21:43:39 +0000 Subject: [PATCH] OSX build fix --- source/Makefile.mk | 10 +++------- source/carla_style.py | 4 ++-- source/modules/native-plugins/zynaddsubfx-src.cpp | 2 ++ source/modules/native-plugins/zynaddsubfx-synth.cpp | 6 +----- .../modules/native-plugins/zynaddsubfx/Misc/Part.cpp | 10 +++++----- .../modules/native-plugins/zynaddsubfx/Misc/Util.cpp | 2 ++ source/modules/rtmempool/list.h | 2 ++ source/patchcanvas_theme.py | 6 ++++++ 8 files changed, 23 insertions(+), 19 deletions(-) diff --git a/source/Makefile.mk b/source/Makefile.mk index 2f4cc7a5e..6121bf4c5 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -111,13 +111,9 @@ BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++0x -std=gnu++0x $(CXXFLAGS) LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS) ifeq ($(MACOS),true) -# No C++11 support; force 32bit per default -BUILD_C_FLAGS += $(32BIT_FLAGS) -BUILD_CXX_FLAGS = $(BASE_FLAGS) $(32BIT_FLAGS) $(CXXFLAGS) -LINK_FLAGS = $(32BIT_FLAGS) $(LDFLAGS) -# Set target -BUILD_CXX_FLAGS += -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_5 -BUILD_CXX_FLAGS += -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_5 +# No C++11 support +BUILD_CXX_FLAGS = $(BASE_FLAGS) $(CXXFLAGS) +LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS) endif # -------------------------------------------------------------- diff --git a/source/carla_style.py b/source/carla_style.py index 20019fdb7..b35fa8611 100644 --- a/source/carla_style.py +++ b/source/carla_style.py @@ -198,8 +198,8 @@ class CarlaApplication(object): useProTheme = settings.value("Main/UseProTheme", True, type=bool) - if useProTheme or True: - #font = QFont("DejaVu Sans [Book]", 8, QFont.Normal) + if useProTheme: + #font = QFont("DejaVu Sans [Book]", 12 if MACOS else 8, QFont.Normal) #self.fApp.setFont(font) #QApplication.setFont(font) diff --git a/source/modules/native-plugins/zynaddsubfx-src.cpp b/source/modules/native-plugins/zynaddsubfx-src.cpp index 743044a40..ae09b40b8 100644 --- a/source/modules/native-plugins/zynaddsubfx-src.cpp +++ b/source/modules/native-plugins/zynaddsubfx-src.cpp @@ -15,6 +15,8 @@ * For a full copy of the GNU General Public License see the doc/GPL.txt file. */ +#include "CarlaDefines.h" + // zynaddsubfx includes #include "zynaddsubfx/DSP/AnalogFilter.cpp" #include "zynaddsubfx/DSP/FFTwrapper.cpp" diff --git a/source/modules/native-plugins/zynaddsubfx-synth.cpp b/source/modules/native-plugins/zynaddsubfx-synth.cpp index ee077d114..1b86599f3 100644 --- a/source/modules/native-plugins/zynaddsubfx-synth.cpp +++ b/source/modules/native-plugins/zynaddsubfx-synth.cpp @@ -15,10 +15,6 @@ * For a full copy of the GNU General Public License see the doc/GPL.txt file. */ -// for UINT32_MAX -#define __STDC_LIMIT_MACROS -#include - #include "CarlaNative.hpp" #include "CarlaMIDI.h" #include "CarlaThread.hpp" @@ -87,7 +83,7 @@ public: if (! fInitiated) return; - for (auto it = fPrograms.begin(); it.valid(); it.next()) + for (LinkedList::Itenerator it = fPrograms.begin(); it.valid(); it.next()) { const ProgramInfo* const& pInfo(it.getValue()); delete pInfo; diff --git a/source/modules/native-plugins/zynaddsubfx/Misc/Part.cpp b/source/modules/native-plugins/zynaddsubfx/Misc/Part.cpp index 4054a8e7f..1907f177a 100644 --- a/source/modules/native-plugins/zynaddsubfx/Misc/Part.cpp +++ b/source/modules/native-plugins/zynaddsubfx/Misc/Part.cpp @@ -153,21 +153,21 @@ void Part::defaultsinstrument() /* * Cleanup the part */ -void Part::cleanup(bool final) +void Part::cleanup(bool final_) { for(int k = 0; k < POLIPHONY; ++k) KillNotePos(k); for(int i = 0; i < synth->buffersize; ++i) { - partoutl[i] = final ? 0.0f : denormalkillbuf[i]; - partoutr[i] = final ? 0.0f : denormalkillbuf[i]; + partoutl[i] = final_ ? 0.0f : denormalkillbuf[i]; + partoutr[i] = final_ ? 0.0f : denormalkillbuf[i]; } ctl.resetall(); for(int nefx = 0; nefx < NUM_PART_EFX; ++nefx) partefx[nefx]->cleanup(); for(int n = 0; n < NUM_PART_EFX + 1; ++n) for(int i = 0; i < synth->buffersize; ++i) { - partfxinputl[n][i] = final ? 0.0f : denormalkillbuf[i]; - partfxinputr[n][i] = final ? 0.0f : denormalkillbuf[i]; + partfxinputl[n][i] = final_ ? 0.0f : denormalkillbuf[i]; + partfxinputr[n][i] = final_ ? 0.0f : denormalkillbuf[i]; } } diff --git a/source/modules/native-plugins/zynaddsubfx/Misc/Util.cpp b/source/modules/native-plugins/zynaddsubfx/Misc/Util.cpp index a4b2440d6..5068e1cb5 100644 --- a/source/modules/native-plugins/zynaddsubfx/Misc/Util.cpp +++ b/source/modules/native-plugins/zynaddsubfx/Misc/Util.cpp @@ -119,12 +119,14 @@ bool fileexists(const char *filename) void set_realtime() { +#ifdef CARLA_OS_LINUX sched_param sc; sc.sched_priority = 60; //if you want get "sched_setscheduler undeclared" from compilation, //you can safely remove the folowing line: sched_setscheduler(0, SCHED_FIFO, &sc); //if (err==0) printf("Real-time"); +#endif } void os_sleep(long length) diff --git a/source/modules/rtmempool/list.h b/source/modules/rtmempool/list.h index 9df654270..05f0fe778 100644 --- a/source/modules/rtmempool/list.h +++ b/source/modules/rtmempool/list.h @@ -38,6 +38,8 @@ # include #endif +#define __THROW + #ifndef offsetof # define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif diff --git a/source/patchcanvas_theme.py b/source/patchcanvas_theme.py index 74c64f3f3..9ffba080b 100644 --- a/source/patchcanvas_theme.py +++ b/source/patchcanvas_theme.py @@ -24,6 +24,8 @@ from carla_config import * # ------------------------------------------------------------------------------------------------------------ # Imports (Global) +#from sys import platform + if config_UseQt5: from PyQt5.QtCore import Qt from PyQt5.QtGui import QColor, QFont, QPen, QPixmap @@ -470,6 +472,10 @@ class Theme(object): self.rubberband_pen = QPen(QColor(1, 230, 238), 2, Qt.SolidLine) self.rubberband_brush = QColor(90, 90, 90, 100) +# if platform == "darwin": +# self.box_font_size += 3 +# self.port_font_size += 3 + def getDefaultTheme(): return Theme.THEME_MODERN_DARK