Browse Source

Allow to run jack-apps as bridges. recursion ftw!

tags/1.9.8
falkTX 7 years ago
parent
commit
2bf815527c
3 changed files with 15 additions and 14 deletions
  1. +0
    -4
      source/backend/engine/CarlaEngine.cpp
  2. +14
    -10
      source/backend/plugin/CarlaPluginJack.cpp
  3. +1
    -0
      source/bridges-plugin/Makefile

+ 0
- 4
source/backend/engine/CarlaEngine.cpp View File

@@ -618,11 +618,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype,
break;

case PLUGIN_JACK:
#ifndef BUILD_BRIDGE
plugin = CarlaPlugin::newJackApp(initializer);
#else
setLastError("Do not use jack applications as bridges, too much experimental stuff together!");
#endif
break;
}
}


+ 14
- 10
source/backend/plugin/CarlaPluginJack.cpp View File

@@ -15,10 +15,6 @@
* For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/

#ifdef BUILD_BRIDGE
# error This file should not be used under bridge mode
#endif

#include "CarlaPluginInternal.hpp"
#include "CarlaEngine.hpp"

@@ -667,8 +663,9 @@ public:
// ----------------------------------------------------------------------------------------------------
// Event Input (System)

#ifndef BUILD_BRIDGE
bool allNotesOffSent = false;
#endif
for (uint32_t i=0, numEvents=pData->event.portIn->getEventCount(); i < numEvents; ++i)
{
const EngineEvent& event(pData->event.portIn->getEvent(i));
@@ -688,6 +685,7 @@ public:
break;

case kEngineControlEventTypeParameter:
#ifndef BUILD_BRIDGE
// Control backend stuff
if (event.channel == pData->ctrlChannel)
{
@@ -734,6 +732,7 @@ public:
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right);
}
}
#endif
break;

case kEngineControlEventTypeMidiBank:
@@ -771,11 +770,13 @@ public:
case kEngineControlEventTypeAllNotesOff:
if (pData->options & PLUGIN_OPTION_SEND_ALL_SOUND_OFF)
{
#ifndef BUILD_BRIDGE
if (event.channel == pData->ctrlChannel && ! allNotesOffSent)
{
allNotesOffSent = true;
sendMidiAllNotesOffToCallback();
}
#endif

fShmRtClientControl.writeOpcode(kPluginBridgeRtClientControlEventAllNotesOff);
fShmRtClientControl.writeUInt(event.time);
@@ -959,6 +960,7 @@ public:
for (uint32_t i=0; i < fInfo.aOuts; ++i)
FloatVectorOperations::copy(audioOut[i], fShmAudioPool.data + ((i + fInfo.aIns) * frames), iframes);

#ifndef BUILD_BRIDGE
// --------------------------------------------------------------------------------------------------------
// Post-processing (dry/wet, volume and balance)

@@ -1025,7 +1027,7 @@ public:
}

} // End of Post-processing
#endif
// --------------------------------------------------------------------------------------------------------

pData->singleMutex.unlock();
@@ -1275,8 +1277,10 @@ public:
// setup hints and options

// FIXME dryWet broken
pData->hints = PLUGIN_IS_BRIDGE | /*PLUGIN_CAN_DRYWET |*/ PLUGIN_CAN_VOLUME | PLUGIN_CAN_BALANCE | PLUGIN_NEEDS_FIXED_BUFFERS;
pData->options = PLUGIN_OPTION_FIXED_BUFFERS;
pData->hints = PLUGIN_IS_BRIDGE | PLUGIN_OPTION_FIXED_BUFFERS;
#ifndef BUILD_BRIDGE
pData->options|= /*PLUGIN_CAN_DRYWET |*/ PLUGIN_CAN_VOLUME | PLUGIN_CAN_BALANCE;
#endif
//fInfo.optionsAvailable = optionAv;

if (setupHints & 0x10)
@@ -1360,11 +1364,11 @@ private:

if (wasActive)
{
#ifdef HAVE_LIBLO
#if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE)
if (pData->engine->isOscControlRegistered())
pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_ACTIVE, 0.0f);
#endif
pData->engine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pData->id, PARAMETER_ACTIVE, 0, 0.0f, nullptr);
#endif
}

if (pData->hints & PLUGIN_HAS_CUSTOM_UI)


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

@@ -177,6 +177,7 @@ OBJS_native = \
$(OBJDIR)/CarlaPlugin.cpp.o \
$(OBJDIR)/CarlaPluginBridge.cpp.o \
$(OBJDIR)/CarlaPluginInternal.cpp.o \
$(OBJDIR)/CarlaPluginJack.cpp.o \
$(OBJDIR)/CarlaPluginNative.cpp.o \
$(OBJDIR)/CarlaPluginLADSPA.cpp.o \
$(OBJDIR)/CarlaPluginDSSI.cpp.o \


Loading…
Cancel
Save