Browse Source

Fix jack-as-plugin flags for debugging

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 4 years ago
parent
commit
0873c66902
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 18 additions and 8 deletions
  1. +12
    -5
      source/backend/plugin/CarlaPluginJack.cpp
  2. +4
    -1
      source/frontend/carla_backend.py
  3. +2
    -2
      source/includes/CarlaLibJackHints.h

+ 12
- 5
source/backend/plugin/CarlaPluginJack.cpp View File

@@ -1550,11 +1550,14 @@ public:
}

for (int i=4; --i >= 0;) {
CARLA_SAFE_ASSERT_RETURN(label[i] >= '0' && label[i] <= '0'+64, false);
}
for (int i=6; --i >= 4;) {
CARLA_SAFE_ASSERT_RETURN(label[i] >= '0' && label[i] < '0'+0x4f, false);
CARLA_SAFE_ASSERT_INT2_RETURN(label[i] >= '0' && label[i] <= '0'+64, i, label[i], false);
}
CARLA_SAFE_ASSERT_INT2_RETURN(label[4] >= '0' && label[4] < '0'+0x4f, 4, label[4], false);
CARLA_SAFE_ASSERT_UINT2_RETURN(static_cast<uchar>(label[5]) >= '0' &&
static_cast<uchar>(label[5]) <= '0'+0x73,
static_cast<uchar>(label[5]),
static_cast<uchar>('0'+0x73),
false);

fInfo.aIns = static_cast<uint8_t>(label[0] - '0');
fInfo.aOuts = static_cast<uint8_t>(label[1] - '0');
@@ -1622,7 +1625,7 @@ public:
// ---------------------------------------------------------------
// setup hints and options

fSetupHints = static_cast<uint>(label[5] - '0');
fSetupHints = static_cast<uchar>(label[5]) - '0';

// FIXME dryWet broken
pData->hints = PLUGIN_IS_BRIDGE | PLUGIN_OPTION_FIXED_BUFFERS;
@@ -1666,6 +1669,10 @@ public:
return false;
}

// remove unprintable characters if needed
if (fSetupHints & LIBJACK_FLAG_EXTERNAL_START)
fInfo.setupLabel[5] = '0' + (fSetupHints ^ LIBJACK_FLAG_EXTERNAL_START);

return true;
}



+ 4
- 1
source/frontend/carla_backend.py View File

@@ -3005,7 +3005,10 @@ class CarlaHostDLL(CarlaHostMeta):
def add_plugin(self, btype, ptype, filename, name, label, uniqueId, extraPtr, options):
cfilename = filename.encode("utf-8") if filename else None
cname = name.encode("utf-8") if name else None
clabel = label.encode("utf-8") if label else None
if ptype == PLUGIN_JACK:
clabel = bytes(ord(b) for b in label)
else:
clabel = label.encode("utf-8") if label else None
return bool(self.lib.carla_add_plugin(self.handle,
btype, ptype,
cfilename, cname, clabel, uniqueId, cast(extraPtr, c_void_p), options))


+ 2
- 2
source/includes/CarlaLibJackHints.h View File

@@ -1,6 +1,6 @@
/*
* Carla JACK API for external applications
* Copyright (C) 2016-2019 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2016-2020 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
@@ -31,7 +31,7 @@ enum SetupHints {
// Audio/MIDI Buffers management
LIBJACK_FLAG_AUDIO_BUFFERS_ADDITION = 0x10,
LIBJACK_FLAG_MIDI_OUTPUT_CHANNEL_MIXDOWN = 0x20,
// Developer options
// Developer options, not saved on disk
LIBJACK_FLAG_EXTERNAL_START = 0x40,
};



Loading…
Cancel
Save