| @@ -280,8 +280,8 @@ struct CARLA_API EngineTimeInfoBBT { | |||||
| int32_t bar; //!< current bar | int32_t bar; //!< current bar | ||||
| int32_t beat; //!< current beat-within-bar | int32_t beat; //!< current beat-within-bar | ||||
| int32_t tick; //!< current tick-within-beat | |||||
| double barStartTick; | |||||
| double tick; //!< current tick-within-beat | |||||
| double barStartTick; | |||||
| float beatsPerBar; //!< time signature "numerator" | float beatsPerBar; //!< time signature "numerator" | ||||
| float beatType; //!< time signature "denominator" | float beatType; //!< time signature "denominator" | ||||
| @@ -1797,7 +1797,7 @@ const char* carla_get_host_osc_url_tcp() | |||||
| { | { | ||||
| carla_debug("carla_get_host_osc_url_tcp()"); | carla_debug("carla_get_host_osc_url_tcp()"); | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| if (gStandalone.engine == nullptr) | if (gStandalone.engine == nullptr) | ||||
| { | { | ||||
| carla_stderr2("carla_get_host_osc_url_tcp() failed, engine is not running"); | carla_stderr2("carla_get_host_osc_url_tcp() failed, engine is not running"); | ||||
| @@ -1815,7 +1815,7 @@ const char* carla_get_host_osc_url_udp() | |||||
| { | { | ||||
| carla_debug("carla_get_host_osc_url_udp()"); | carla_debug("carla_get_host_osc_url_udp()"); | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| if (gStandalone.engine == nullptr) | if (gStandalone.engine == nullptr) | ||||
| { | { | ||||
| carla_stderr2("carla_get_host_osc_url_udp() failed, engine is not running"); | carla_stderr2("carla_get_host_osc_url_udp() failed, engine is not running"); | ||||
| @@ -282,7 +282,7 @@ void CarlaEngine::idle() noexcept | |||||
| } | } | ||||
| } | } | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| pData->osc.idle(); | pData->osc.idle(); | ||||
| #endif | #endif | ||||
| } | } | ||||
| @@ -490,7 +490,9 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| bool use16Outs; | bool use16Outs; | ||||
| #endif | |||||
| setLastError("Invalid or unsupported plugin type"); | setLastError("Invalid or unsupported plugin type"); | ||||
| switch (ptype) | switch (ptype) | ||||
| @@ -498,10 +500,6 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| case PLUGIN_NONE: | case PLUGIN_NONE: | ||||
| break; | break; | ||||
| case PLUGIN_INTERNAL: | |||||
| plugin = CarlaPlugin::newNative(initializer); | |||||
| break; | |||||
| case PLUGIN_LADSPA: | case PLUGIN_LADSPA: | ||||
| plugin = CarlaPlugin::newLADSPA(initializer, (const LADSPA_RDF_Descriptor*)extra); | plugin = CarlaPlugin::newLADSPA(initializer, (const LADSPA_RDF_Descriptor*)extra); | ||||
| break; | break; | ||||
| @@ -518,6 +516,11 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| plugin = CarlaPlugin::newVST2(initializer); | plugin = CarlaPlugin::newVST2(initializer); | ||||
| break; | break; | ||||
| #ifndef BUILD_BRIDGE | |||||
| case PLUGIN_INTERNAL: | |||||
| plugin = CarlaPlugin::newNative(initializer); | |||||
| break; | |||||
| case PLUGIN_SF2: | case PLUGIN_SF2: | ||||
| use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0); | use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0); | ||||
| plugin = CarlaPlugin::newFluidSynth(initializer, use16Outs); | plugin = CarlaPlugin::newFluidSynth(initializer, use16Outs); | ||||
| @@ -530,6 +533,14 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| case PLUGIN_JACK: | case PLUGIN_JACK: | ||||
| plugin = CarlaPlugin::newJackApp(initializer); | plugin = CarlaPlugin::newJackApp(initializer); | ||||
| break; | break; | ||||
| #else | |||||
| case PLUGIN_INTERNAL: | |||||
| case PLUGIN_SF2: | |||||
| case PLUGIN_SFZ: | |||||
| case PLUGIN_JACK: | |||||
| setLastError("Plugin bridges cannot handle this binary"); | |||||
| break; | |||||
| #endif | |||||
| } | } | ||||
| } | } | ||||
| @@ -1620,7 +1631,7 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch | |||||
| } | } | ||||
| } | } | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| // OSC Stuff | // OSC Stuff | ||||
| @@ -1405,12 +1405,6 @@ CarlaEngine* CarlaEngine::newBridge(const char* const audioPoolBaseName, const c | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| #ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CarlaPlugin* CarlaPlugin::newNative(const CarlaPlugin::Initializer&) { return nullptr; } | |||||
| CarlaPlugin* CarlaPlugin::newFileSF2(const CarlaPlugin::Initializer&, const bool) { return nullptr; } | |||||
| CarlaPlugin* CarlaPlugin::newFileSFZ(const CarlaPlugin::Initializer&) { return nullptr; } | |||||
| #endif | |||||
| CARLA_BACKEND_END_NAMESPACE | CARLA_BACKEND_END_NAMESPACE | ||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| @@ -297,7 +297,7 @@ EngineTimeInfoBBT::EngineTimeInfoBBT() noexcept | |||||
| : valid(false), | : valid(false), | ||||
| bar(0), | bar(0), | ||||
| beat(0), | beat(0), | ||||
| tick(0), | |||||
| tick(0.0), | |||||
| barStartTick(0.0), | barStartTick(0.0), | ||||
| beatsPerBar(0.0f), | beatsPerBar(0.0f), | ||||
| beatType(0.0f), | beatType(0.0f), | ||||
| @@ -245,7 +245,7 @@ void EngineInternalTime::fillEngineTimeInfo(const uint32_t newFrames) noexcept | |||||
| timeInfo.bbt.beatsPerBar = static_cast<float>(beatsPerBar); | timeInfo.bbt.beatsPerBar = static_cast<float>(beatsPerBar); | ||||
| timeInfo.bbt.beatsPerMinute = beatsPerMinute; | timeInfo.bbt.beatsPerMinute = beatsPerMinute; | ||||
| timeInfo.bbt.tick = static_cast<int32_t>(ticktmp); | |||||
| timeInfo.bbt.tick = ticktmp; | |||||
| tick = ticktmp; | tick = ticktmp; | ||||
| if (transportMode == ENGINE_TRANSPORT_MODE_INTERNAL && timeInfo.playing) | if (transportMode == ENGINE_TRANSPORT_MODE_INTERNAL && timeInfo.playing) | ||||
| @@ -322,7 +322,7 @@ void EngineInternalTime::fillJackTimeInfo(jack_position_t* const pos, const uint | |||||
| pos->beats_per_bar = static_cast<float>(beatsPerBar); | pos->beats_per_bar = static_cast<float>(beatsPerBar); | ||||
| pos->beats_per_minute = beatsPerMinute; | pos->beats_per_minute = beatsPerMinute; | ||||
| pos->tick = static_cast<int32_t>(ticktmp); | |||||
| pos->tick = ticktmp; | |||||
| tick = ticktmp; | tick = ticktmp; | ||||
| } | } | ||||
| @@ -418,7 +418,7 @@ void EngineNextAction::clearAndReset() noexcept | |||||
| CarlaEngine::ProtectedData::ProtectedData(CarlaEngine* const engine) noexcept | CarlaEngine::ProtectedData::ProtectedData(CarlaEngine* const engine) noexcept | ||||
| : thread(engine), | : thread(engine), | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| osc(engine), | osc(engine), | ||||
| oscData(nullptr), | oscData(nullptr), | ||||
| #endif | #endif | ||||
| @@ -473,7 +473,7 @@ CarlaEngine::ProtectedData::~ProtectedData() noexcept | |||||
| bool CarlaEngine::ProtectedData::init(const char* const clientName) | bool CarlaEngine::ProtectedData::init(const char* const clientName) | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(name.isEmpty(), "Invalid engine internal data (err #1)"); | CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(name.isEmpty(), "Invalid engine internal data (err #1)"); | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(oscData == nullptr, "Invalid engine internal data (err #2)"); | CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(oscData == nullptr, "Invalid engine internal data (err #2)"); | ||||
| #endif | #endif | ||||
| CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(events.in == nullptr, "Invalid engine internal data (err #4)"); | CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(events.in == nullptr, "Invalid engine internal data (err #4)"); | ||||
| @@ -523,7 +523,7 @@ bool CarlaEngine::ProtectedData::init(const char* const clientName) | |||||
| timeInfo.clear(); | timeInfo.clear(); | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| osc.init(clientName); | osc.init(clientName); | ||||
| # ifndef BUILD_BRIDGE | # ifndef BUILD_BRIDGE | ||||
| oscData = osc.getControlData(); | oscData = osc.getControlData(); | ||||
| @@ -554,7 +554,7 @@ void CarlaEngine::ProtectedData::close() | |||||
| thread.stopThread(500); | thread.stopThread(500); | ||||
| nextAction.clearAndReset(); | nextAction.clearAndReset(); | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| osc.close(); | osc.close(); | ||||
| oscData = nullptr; | oscData = nullptr; | ||||
| #endif | #endif | ||||
| @@ -18,11 +18,13 @@ | |||||
| #ifndef CARLA_ENGINE_INTERNAL_HPP_INCLUDED | #ifndef CARLA_ENGINE_INTERNAL_HPP_INCLUDED | ||||
| #define CARLA_ENGINE_INTERNAL_HPP_INCLUDED | #define CARLA_ENGINE_INTERNAL_HPP_INCLUDED | ||||
| #include "CarlaEngineOsc.hpp" | |||||
| #include "CarlaEngineThread.hpp" | #include "CarlaEngineThread.hpp" | ||||
| #include "CarlaEngineUtils.hpp" | #include "CarlaEngineUtils.hpp" | ||||
| #include "hylia/hylia.h" | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| # include "CarlaEngineOsc.hpp" | |||||
| # include "hylia/hylia.h" | |||||
| #endif | |||||
| // FIXME only use CARLA_PREVENT_HEAP_ALLOCATION for structs | // FIXME only use CARLA_PREVENT_HEAP_ALLOCATION for structs | ||||
| // maybe separate macro | // maybe separate macro | ||||
| @@ -207,7 +209,7 @@ struct EnginePluginData { | |||||
| struct CarlaEngine::ProtectedData { | struct CarlaEngine::ProtectedData { | ||||
| CarlaEngineThread thread; | CarlaEngineThread thread; | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| CarlaEngineOsc osc; | CarlaEngineOsc osc; | ||||
| # ifdef BUILD_BRIDGE | # ifdef BUILD_BRIDGE | ||||
| CarlaOscData* oscData; | CarlaOscData* oscData; | ||||
| @@ -1751,7 +1751,8 @@ protected: | |||||
| if (timeInfo.bbt.valid) | if (timeInfo.bbt.valid) | ||||
| { | { | ||||
| std::sprintf(tmpBuf, P_UINT64 ":%i:%i:%i\n", timeInfo.frame, timeInfo.bbt.bar, timeInfo.bbt.beat, timeInfo.bbt.tick); | |||||
| std::sprintf(tmpBuf, P_UINT64 ":%i:%i:%i\n", | |||||
| timeInfo.frame, timeInfo.bbt.bar, timeInfo.bbt.beat, static_cast<int>(timeInfo.bbt.tick + 0.5)); | |||||
| if (! fUiServer.writeMessage(tmpBuf)) | if (! fUiServer.writeMessage(tmpBuf)) | ||||
| return; | return; | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Plugin Host | * Carla Plugin Host | ||||
| * Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2018 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 | ||||
| @@ -46,7 +46,7 @@ void CarlaEngineThread::run() noexcept | |||||
| #endif | #endif | ||||
| carla_debug("CarlaEngineThread::run()"); | carla_debug("CarlaEngineThread::run()"); | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| const bool isPlugin(kEngine->getType() == kEngineTypePlugin); | const bool isPlugin(kEngine->getType() == kEngineTypePlugin); | ||||
| #endif | #endif | ||||
| float value; | float value; | ||||
| @@ -63,7 +63,7 @@ void CarlaEngineThread::run() noexcept | |||||
| const bool oscRegisted = false; | const bool oscRegisted = false; | ||||
| #endif | #endif | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| if (isPlugin) | if (isPlugin) | ||||
| kEngine->idleOsc(); | kEngine->idleOsc(); | ||||
| #endif | #endif | ||||
| @@ -21,7 +21,7 @@ | |||||
| #include "CarlaDssiUtils.hpp" | #include "CarlaDssiUtils.hpp" | ||||
| #include "CarlaMathUtils.hpp" | #include "CarlaMathUtils.hpp" | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| # include "CarlaOscUtils.hpp" | # include "CarlaOscUtils.hpp" | ||||
| # include "CarlaPipeUtils.hpp" | # include "CarlaPipeUtils.hpp" | ||||
| # include "CarlaThread.hpp" | # include "CarlaThread.hpp" | ||||
| @@ -63,7 +63,7 @@ CARLA_BACKEND_START_NAMESPACE | |||||
| static const CustomData kCustomDataFallback = { nullptr, nullptr, nullptr }; | static const CustomData kCustomDataFallback = { nullptr, nullptr, nullptr }; | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| class CarlaThreadDSSIUI : public CarlaThread | class CarlaThreadDSSIUI : public CarlaThread | ||||
| @@ -283,7 +283,7 @@ public: | |||||
| fForcedStereoOut(false), | fForcedStereoOut(false), | ||||
| fNeedsFixedBuffers(false), | fNeedsFixedBuffers(false), | ||||
| fUsesCustomData(false) | fUsesCustomData(false) | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| , fOscData(), | , fOscData(), | ||||
| fThreadUI(engine, this, fOscData), | fThreadUI(engine, this, fOscData), | ||||
| fUiFilename(nullptr) | fUiFilename(nullptr) | ||||
| @@ -298,7 +298,7 @@ public: | |||||
| { | { | ||||
| carla_debug("CarlaPluginDSSI::~CarlaPluginDSSI()"); | carla_debug("CarlaPluginDSSI::~CarlaPluginDSSI()"); | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| // close UI | // close UI | ||||
| if (fUiFilename != nullptr) | if (fUiFilename != nullptr) | ||||
| { | { | ||||
| @@ -594,7 +594,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| if (sendGui && fOscData.target != nullptr) | if (sendGui && fOscData.target != nullptr) | ||||
| osc_send_configure(fOscData, key, value); | osc_send_configure(fOscData, key, value); | ||||
| #endif | #endif | ||||
| @@ -632,7 +632,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| #if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| const bool sendOsc(pData->engine->isOscControlRegistered()); | const bool sendOsc(pData->engine->isOscControlRegistered()); | ||||
| #else | #else | ||||
| const bool sendOsc(false); | const bool sendOsc(false); | ||||
| @@ -684,7 +684,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Set ui stuff | // Set ui stuff | ||||
| @@ -1083,7 +1083,7 @@ public: | |||||
| if (LADSPA_IS_HARD_RT_CAPABLE(fDescriptor->Properties)) | if (LADSPA_IS_HARD_RT_CAPABLE(fDescriptor->Properties)) | ||||
| pData->hints |= PLUGIN_IS_RTSAFE; | pData->hints |= PLUGIN_IS_RTSAFE; | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| if (fUiFilename != nullptr) | if (fUiFilename != nullptr) | ||||
| pData->hints |= PLUGIN_HAS_CUSTOM_UI; | pData->hints |= PLUGIN_HAS_CUSTOM_UI; | ||||
| #endif | #endif | ||||
| @@ -1219,7 +1219,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| #if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| // Update OSC Names | // Update OSC Names | ||||
| if (pData->engine->isOscControlRegistered() && pData->id < pData->engine->getCurrentPluginCount()) | if (pData->engine->isOscControlRegistered() && pData->id < pData->engine->getCurrentPluginCount()) | ||||
| { | { | ||||
| @@ -2185,7 +2185,7 @@ public: | |||||
| carla_debug("CarlaPluginDSSI::clearBuffers() - end"); | carla_debug("CarlaPluginDSSI::clearBuffers() - end"); | ||||
| } | } | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // OSC stuff | // OSC stuff | ||||
| @@ -2444,7 +2444,7 @@ public: | |||||
| osc_send_midi(fOscData, midiData); | osc_send_midi(fOscData, midiData); | ||||
| #endif | #endif | ||||
| } | } | ||||
| #endif // HAVE_LIBLO | |||||
| #endif // HAVE_LIBLO && !BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| @@ -2453,7 +2453,7 @@ public: | |||||
| return fDssiDescriptor; | return fDssiDescriptor; | ||||
| } | } | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| uintptr_t getUiBridgeProcessId() const noexcept override | uintptr_t getUiBridgeProcessId() const noexcept override | ||||
| { | { | ||||
| return fThreadUI.getProcessId(); | return fThreadUI.getProcessId(); | ||||
| @@ -2653,7 +2653,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| // --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
| // check for gui | // check for gui | ||||
| @@ -2719,7 +2719,7 @@ private: | |||||
| bool fNeedsFixedBuffers; | bool fNeedsFixedBuffers; | ||||
| bool fUsesCustomData; | bool fUsesCustomData; | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| CarlaOscData fOscData; | CarlaOscData fOscData; | ||||
| CarlaThreadDSSIUI fThreadUI; | CarlaThreadDSSIUI fThreadUI; | ||||
| const char* fUiFilename; | const char* fUiFilename; | ||||
| @@ -30,7 +30,6 @@ | |||||
| #include "CarlaPluginUI.hpp" | #include "CarlaPluginUI.hpp" | ||||
| #include "Lv2AtomRingBuffer.hpp" | #include "Lv2AtomRingBuffer.hpp" | ||||
| #include "../engine/CarlaEngineOsc.hpp" | |||||
| #include "../modules/lilv/config/lilv_config.h" | #include "../modules/lilv/config/lilv_config.h" | ||||
| extern "C" { | extern "C" { | ||||
| @@ -2804,7 +2803,7 @@ public: | |||||
| int32_t rindex; | int32_t rindex; | ||||
| const double barBeat = static_cast<double>(timeInfo.bbt.beat - 1) | const double barBeat = static_cast<double>(timeInfo.bbt.beat - 1) | ||||
| + (static_cast<double>(timeInfo.bbt.tick) / timeInfo.bbt.ticksPerBeat); | |||||
| + (timeInfo.bbt.tick / timeInfo.bbt.ticksPerBeat); | |||||
| // update input ports | // update input ports | ||||
| for (uint32_t k=0; k < pData->param.count; ++k) | for (uint32_t k=0; k < pData->param.count; ++k) | ||||
| @@ -1140,7 +1140,7 @@ public: | |||||
| const double ppqBar = double(timeInfo.bbt.bar - 1) * timeInfo.bbt.beatsPerBar; | const double ppqBar = double(timeInfo.bbt.bar - 1) * timeInfo.bbt.beatsPerBar; | ||||
| const double ppqBeat = double(timeInfo.bbt.beat - 1); | const double ppqBeat = double(timeInfo.bbt.beat - 1); | ||||
| const double ppqTick = double(timeInfo.bbt.tick) / timeInfo.bbt.ticksPerBeat; | |||||
| const double ppqTick = timeInfo.bbt.tick / timeInfo.bbt.ticksPerBeat; | |||||
| // PPQ Pos | // PPQ Pos | ||||
| fTimeInfo.ppqPos = ppqBar + ppqBeat + ppqTick; | fTimeInfo.ppqPos = ppqBar + ppqBeat + ppqTick; | ||||
| @@ -24,7 +24,6 @@ endif | |||||
| BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | ||||
| BUILD_CXX_FLAGS += -I$(CWD)/backend/engine -I$(CWD)/backend/plugin | BUILD_CXX_FLAGS += -I$(CWD)/backend/engine -I$(CWD)/backend/plugin | ||||
| BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | |||||
| 32BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH | 32BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH | ||||
| 64BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH | 64BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH | ||||
| @@ -64,13 +63,12 @@ LIBS_win32 += $(MODULEDIR)/water.win32.a | |||||
| LIBS_win64 += $(MODULEDIR)/water.win64.a | LIBS_win64 += $(MODULEDIR)/water.win64.a | ||||
| LINK_FLAGS += $(WATER_LIBS) | LINK_FLAGS += $(WATER_LIBS) | ||||
| LINK_FLAGS += $(LIBLO_LIBS) | |||||
| LINK_FLAGS += $(X11_LIBS) | LINK_FLAGS += $(X11_LIBS) | ||||
| # ---------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------- | ||||
| NATIVE_BUILD_FLAGS = $(NATIVE_PLUGINS_FLAGS) | |||||
| NATIVE_LINK_FLAGS = | |||||
| NATIVE_BUILD_FLAGS = $(NATIVE_PLUGINS_FLAGS) $(LIBLO_FLAGS) | |||||
| NATIVE_LINK_FLAGS = $(LIBLO_LIBS) | |||||
| NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS) | NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS) | ||||
| NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS) | NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS) | ||||
| @@ -126,8 +124,6 @@ OBJS_arch = \ | |||||
| $(OBJDIR)/CarlaEngineClient.cpp.arch.o \ | $(OBJDIR)/CarlaEngineClient.cpp.arch.o \ | ||||
| $(OBJDIR)/CarlaEngineData.cpp.arch.o \ | $(OBJDIR)/CarlaEngineData.cpp.arch.o \ | ||||
| $(OBJDIR)/CarlaEngineInternal.cpp.arch.o \ | $(OBJDIR)/CarlaEngineInternal.cpp.arch.o \ | ||||
| $(OBJDIR)/CarlaEngineOsc.cpp.arch.o \ | |||||
| $(OBJDIR)/CarlaEngineOscSend.cpp.arch.o \ | |||||
| $(OBJDIR)/CarlaEnginePorts.cpp.arch.o \ | $(OBJDIR)/CarlaEnginePorts.cpp.arch.o \ | ||||
| $(OBJDIR)/CarlaEngineThread.cpp.arch.o \ | $(OBJDIR)/CarlaEngineThread.cpp.arch.o \ | ||||
| $(OBJDIR)/CarlaEngineJack.cpp.arch.o \ | $(OBJDIR)/CarlaEngineJack.cpp.arch.o \ | ||||
| @@ -135,7 +131,6 @@ OBJS_arch = \ | |||||
| $(OBJDIR)/CarlaPlugin.cpp.arch.o \ | $(OBJDIR)/CarlaPlugin.cpp.arch.o \ | ||||
| $(OBJDIR)/CarlaPluginBridge.cpp.arch.o \ | $(OBJDIR)/CarlaPluginBridge.cpp.arch.o \ | ||||
| $(OBJDIR)/CarlaPluginInternal.cpp.arch.o \ | $(OBJDIR)/CarlaPluginInternal.cpp.arch.o \ | ||||
| $(OBJDIR)/CarlaPluginJack.cpp.arch.o \ | |||||
| $(OBJDIR)/CarlaPluginLADSPA.cpp.arch.o \ | $(OBJDIR)/CarlaPluginLADSPA.cpp.arch.o \ | ||||
| $(OBJDIR)/CarlaPluginDSSI.cpp.arch.o \ | $(OBJDIR)/CarlaPluginDSSI.cpp.arch.o \ | ||||
| $(OBJDIR)/CarlaPluginLV2.cpp.arch.o \ | $(OBJDIR)/CarlaPluginLV2.cpp.arch.o \ | ||||
| @@ -157,8 +157,8 @@ typedef struct { | |||||
| int32_t bar; /** current bar */ | int32_t bar; /** current bar */ | ||||
| int32_t beat; /** current beat-within-bar */ | int32_t beat; /** current beat-within-bar */ | ||||
| int32_t tick; /** current tick-within-beat */ | |||||
| double barStartTick; | |||||
| double tick; /** current tick-within-beat */ | |||||
| double barStartTick; | |||||
| float beatsPerBar; /** time signature "numerator" */ | float beatsPerBar; /** time signature "numerator" */ | ||||
| float beatType; /** time signature "denominator" */ | float beatType; /** time signature "denominator" */ | ||||
| @@ -602,7 +602,7 @@ bool CarlaJackAppClient::handleRtData() | |||||
| fServer.position.bar = bridgeTimeInfo.bar; | fServer.position.bar = bridgeTimeInfo.bar; | ||||
| fServer.position.beat = bridgeTimeInfo.beat; | fServer.position.beat = bridgeTimeInfo.beat; | ||||
| fServer.position.tick = bridgeTimeInfo.tick; | |||||
| fServer.position.tick = static_cast<int32_t>(bridgeTimeInfo.tick + 0.5); | |||||
| fServer.position.beats_per_bar = bridgeTimeInfo.beatsPerBar; | fServer.position.beats_per_bar = bridgeTimeInfo.beatsPerBar; | ||||
| fServer.position.beat_type = bridgeTimeInfo.beatType; | fServer.position.beat_type = bridgeTimeInfo.beatType; | ||||
| @@ -20,7 +20,7 @@ | |||||
| #include "CarlaRingBuffer.hpp" | #include "CarlaRingBuffer.hpp" | ||||
| #define CARLA_PLUGIN_BRIDGE_API_VERSION 3 | |||||
| #define CARLA_PLUGIN_BRIDGE_API_VERSION 4 | |||||
| // ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -141,9 +141,9 @@ struct BridgeTimeInfo { | |||||
| uint64_t usecs; | uint64_t usecs; | ||||
| uint32_t validFlags; | uint32_t validFlags; | ||||
| // bbt | // bbt | ||||
| int32_t bar, beat, tick; | |||||
| int32_t bar, beat; | |||||
| float beatsPerBar, beatType; | float beatsPerBar, beatType; | ||||
| double barStartTick, ticksPerBeat, beatsPerMinute; | |||||
| double tick, barStartTick, ticksPerBeat, beatsPerMinute; | |||||
| }; | }; | ||||
| // ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||