Browse Source

Fix OSX build

tags/1.9.6
falkTX 9 years ago
parent
commit
801bf35b2f
6 changed files with 42 additions and 22 deletions
  1. +18
    -0
      source/backend/Makefile
  2. +6
    -6
      source/backend/plugin/CarlaPluginBridge.cpp
  3. +6
    -2
      source/bridges-ui/CarlaBridgeUI.cpp
  4. +2
    -7
      source/native-plugins/midi-base.hpp
  5. +4
    -4
      source/native-plugins/midi-sequencer.cpp
  6. +6
    -3
      source/utils/CarlaPipeUtils.cpp

+ 18
- 0
source/backend/Makefile View File

@@ -57,6 +57,15 @@ UTILS_LIBS += $(MODULEDIR)/juce_audio_formats.a
UTILS_LIBS += $(MODULEDIR)/juce_core.a
UTILS_LIBS += $(MODULEDIR)/lilv.a

ifeq ($(MACOS),true)
UTILS_LIBS += $(MODULEDIR)/juce_audio_processors.a
UTILS_LIBS += $(MODULEDIR)/juce_data_structures.a
UTILS_LIBS += $(MODULEDIR)/juce_events.a
UTILS_LIBS += $(MODULEDIR)/juce_graphics.a
UTILS_LIBS += $(MODULEDIR)/juce_gui_basics.a
UTILS_LIBS += $(MODULEDIR)/juce_gui_extra.a
endif

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

STANDALONE_LINK_FLAGS = $(JACKBRIDGE_LIBS)
@@ -107,6 +116,15 @@ UTILS_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
UTILS_LINK_FLAGS += $(JUCE_CORE_LIBS)
UTILS_LINK_FLAGS += $(LILV_LIBS)

ifeq ($(MACOS),true)
UTILS_LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
UTILS_LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
UTILS_LINK_FLAGS += $(JUCE_EVENTS_LIBS)
UTILS_LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
UTILS_LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
UTILS_LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
endif

ifneq ($(HAIKU),true)
UTILS_LINK_FLAGS += -lpthread
endif


+ 6
- 6
source/backend/plugin/CarlaPluginBridge.cpp View File

@@ -60,7 +60,7 @@ struct BridgeAudioPool {
, shm(shm_t_INIT) {}
#else
{
shm = shm_t_INIT;
carla_shm_init(shm);
}
#endif

@@ -137,12 +137,12 @@ struct BridgeRtClientControl : public CarlaRingBufferControl<SmallStackBuffer> {
BridgeRtClientControl()
: data(nullptr),
filename(),
needsSemDestroy(false),
needsSemDestroy(false)
#ifdef CARLA_PROPER_CPP11_SUPPORT
shm(shm_t_INIT) {}
, shm(shm_t_INIT) {}
#else
{
shm = shm_t_INIT;
carla_shm_init(shm);
}
#endif

@@ -276,7 +276,7 @@ struct BridgeNonRtClientControl : public CarlaRingBufferControl<BigStackBuffer>
, shm(shm_t_INIT) {}
#else
{
shm = shm_t_INIT;
carla_shm_init(shm);
}
#endif

@@ -391,7 +391,7 @@ struct BridgeNonRtServerControl : public CarlaRingBufferControl<HugeStackBuffer>
, shm(shm_t_INIT) {}
#else
{
shm = shm_t_INIT;
carla_shm_init(shm);
}
#endif



+ 6
- 2
source/bridges-ui/CarlaBridgeUI.cpp View File

@@ -20,8 +20,12 @@

#include "CarlaBase64Utils.hpp"

#undef NULL
#define NULL nullptr
// needed for atom-util
#ifndef nullptr
# undef NULL
# define NULL nullptr
#endif

#include "lv2/atom-util.h"

CARLA_BRIDGE_START_NAMESPACE


+ 2
- 7
source/native-plugins/midi-base.hpp View File

@@ -37,13 +37,6 @@ struct RawMidiEvent {
uint64_t time;
uint8_t size;
uint8_t data[MAX_EVENT_DATA_SIZE];

RawMidiEvent() noexcept
: time(0),
size(0)
{
carla_zeroBytes(data, MAX_EVENT_DATA_SIZE);
}
};

// -----------------------------------------------------------------------
@@ -355,6 +348,8 @@ public:
if (needle == nullptr)
return;

carla_zeroStruct(midiEvent);

tmpSize = needle - dataRead;
CARLA_SAFE_ASSERT_RETURN(tmpSize > 0 && tmpSize < 24,);



+ 4
- 4
source/native-plugins/midi-sequencer.cpp View File

@@ -61,14 +61,14 @@ protected:

for (uint32_t i=0; i < midiEventCount; ++i)
{
const NativeMidiEvent* const midiEvent = &midiEvents[i];
const NativeMidiEvent* const midiEvent(&midiEvents[i]);

rawMidiEvent.time = fTimeInfo.playing ? fTimeInfo.frame + midiEvent->time : 0;
rawMidiEvent.size = midiEvent->size;
rawMidiEvent.data[0] = midiEvent->data[0];
rawMidiEvent.data[1] = midiEvent->data[1];
rawMidiEvent.data[2] = midiEvent->data[2];
rawMidiEvent.data[3] = midiEvent->data[3];
rawMidiEvent.size = midiEvent->size;
rawMidiEvent.time = fTimeInfo.playing ? fTimeInfo.frame + midiEvent->time : 0;

fInEvents.appendRT(rawMidiEvent);
}
@@ -147,7 +147,7 @@ protected:
const double fullBeats = fullTicks/ticksPerBeat;

const uint32_t tick = static_cast<uint32_t>(std::floor(std::fmod(fullTicks, ticksPerBeat)));
const uint32_t beat = static_cast<uint32_t>(std::floor(std::fmod(fullBeats, beatsPerBar)));
const uint32_t beat = static_cast<uint32_t>(std::floor(std::fmod(fullBeats, static_cast<double>(beatsPerBar))));
const uint32_t bar = static_cast<uint32_t>(std::floor(fullBeats/beatsPerBar));

const CarlaMutexLocker cml(getPipeLock());


+ 6
- 3
source/utils/CarlaPipeUtils.cpp View File

@@ -19,11 +19,14 @@
#include "CarlaString.hpp"
#include "CarlaMIDI.h"

#include "juce_core.h"

// needed for atom-util
#undef NULL
#define NULL nullptr
#ifndef nullptr
# undef NULL
# define NULL nullptr
#endif

#include "juce_core.h"
#include "lv2/atom-util.h"

#include <clocale>


Loading…
Cancel
Save