Browse Source

More of the same

tags/v0.9.0
falkTX 13 years ago
parent
commit
e2b1d8adea
12 changed files with 395 additions and 323 deletions
  1. +2
    -0
      src/cadence.py
  2. +1
    -3
      src/carla-backend/carla_backend.cpp
  3. +2
    -2
      src/carla-backend/carla_backend.h
  4. +1
    -0
      src/carla-backend/carla_engine.h
  5. +8
    -0
      src/carla-backend/carla_engine_jack.cpp
  6. +11
    -5
      src/carla-backend/dssi.cpp
  7. +9
    -3
      src/carla-backend/ladspa.cpp
  8. +338
    -303
      src/carla-backend/lv2.cpp
  9. +2
    -2
      src/carla-backend/sf2.cpp
  10. +16
    -2
      src/carla-discovery/carla-discovery.cpp
  11. +3
    -3
      src/carla-discovery/qtcreator/carla-discovery.pro
  12. +2
    -0
      src/carla.py

+ 2
- 0
src/cadence.py View File

@@ -47,6 +47,8 @@ def get_linux_distro():

if os.path.exists("/etc/lsb-release"):
distro = getoutput(". /etc/lsb-release && echo $DISTRIB_DESCRIPTION")
elif os.path.exists("/etc/arch-release"):
distro = "ArchLinux"
else:
distro = os.uname()[0]



+ 1
- 3
src/carla-backend/carla_backend.cpp View File

@@ -1077,9 +1077,7 @@ void set_gui_data(unsigned short plugin_id, int data, quintptr gui_addr)
CarlaPlugin* plugin = CarlaPlugins[i];
if (plugin && plugin->id() == plugin_id)
{
void* ptr = get_pointer(gui_addr);
QDialog* dialog = (QDialog*)ptr;
plugin->set_gui_data(data, dialog);
plugin->set_gui_data(data, (QDialog*)get_pointer(gui_addr));
return;
}
}


+ 2
- 2
src/carla-backend/carla_backend.h View File

@@ -244,7 +244,7 @@ class CarlaPlugin;

typedef void (*CallbackFunc)(CallbackType action, unsigned short plugin_id, int value1, int value2, double value3);

#ifndef CARLA_NO_EXPORTS
#ifndef CARLA_BACKEND_NO_EXPORTS

// -----------------------------------------------------
// Exported symbols (API)
@@ -326,7 +326,7 @@ CARLA_EXPORT double get_latency();
// End of exported symbols
// -----------------------------------------------------

#endif // CARLA_NO_EXPORTS
#endif // CARLA_BACKEND_NO_EXPORTS

CARLA_BACKEND_END_NAMESPACE



+ 1
- 0
src/carla-backend/carla_engine.h View File

@@ -164,6 +164,7 @@ public:
void initBuffer(void* buffer);
uint32_t getEventCount(void* buffer);
const CarlaEngineMidiEvent* getEvent(void* buffer, uint32_t index);
void writeEvent(void* buffer, uint32_t time, uint8_t* data, uint8_t size);
};

CARLA_BACKEND_END_NAMESPACE


+ 8
- 0
src/carla-backend/carla_engine_jack.cpp View File

@@ -541,6 +541,14 @@ const CarlaEngineMidiEvent* CarlaEngineMidiPort::getEvent(void* buffer, uint32_t
return nullptr;
}

void CarlaEngineMidiPort::writeEvent(void* buffer, uint32_t time, uint8_t* data, uint8_t size)
{
if (! isInput)
return;

jack_midi_event_write(buffer, time, data, size);
}

CARLA_BACKEND_END_NAMESPACE

#endif // CARLA_ENGINE_JACK

+ 11
- 5
src/carla-backend/dssi.cpp View File

@@ -466,9 +466,6 @@ public:
step_large = range/10.0;
}

if (LADSPA_IS_HINT_LOGARITHMIC(PortHint.HintDescriptor))
param.data[j].hints |= PARAMETER_IS_LOGARITHMIC;

if (LADSPA_IS_PORT_INPUT(PortType))
{
param.data[j].type = PARAMETER_INPUT;
@@ -516,6 +513,10 @@ public:
qWarning("WARNING - Got a broken Port (Control, but not input or output)");
}

// extra parameter hints
if (LADSPA_IS_HINT_LOGARITHMIC(PortHint.HintDescriptor))
param.data[j].hints |= PARAMETER_IS_LOGARITHMIC;

param.ranges[j].min = min;
param.ranges[j].max = max;
param.ranges[j].def = def;
@@ -584,8 +585,6 @@ public:
aout.count = aouts;
param.count = params;

reload_programs(true);

// plugin checks
m_hints &= ~(PLUGIN_IS_SYNTH | PLUGIN_USES_CHUNKS | PLUGIN_CAN_DRYWET | PLUGIN_CAN_VOLUME | PLUGIN_CAN_BALANCE);

@@ -609,6 +608,8 @@ public:
if (aouts >= 2 && aouts%2 == 0)
m_hints |= PLUGIN_CAN_BALANCE;

reload_programs(true);

x_client->activate();

qDebug("DssiPlugin::reload() - end");
@@ -1226,6 +1227,9 @@ public:
m_active_before = m_active;
}

// -------------------------------------------------------------------
// Cleanup

void delete_buffers()
{
qDebug("DssiPlugin::delete_buffers() - start");
@@ -1238,6 +1242,8 @@ public:
qDebug("DssiPlugin::delete_buffers() - end");
}

// -------------------------------------------------------------------

bool init(const char* filename, const char* label, const char* gui_filename)
{
if (lib_open(filename))


+ 9
- 3
src/carla-backend/ladspa.cpp View File

@@ -507,9 +507,6 @@ public:
step_large = range/10.0;
}

if (LADSPA_IS_HINT_LOGARITHMIC(PortHint.HintDescriptor))
param.data[j].hints |= PARAMETER_IS_LOGARITHMIC;

if (LADSPA_IS_PORT_INPUT(PortType))
{
param.data[j].type = PARAMETER_INPUT;
@@ -545,6 +542,10 @@ public:
qWarning("WARNING - Got a broken Port (Control, but not input or output)");
}

// extra parameter hints
if (LADSPA_IS_HINT_LOGARITHMIC(PortHint.HintDescriptor))
param.data[j].hints |= PARAMETER_IS_LOGARITHMIC;

// check for scalepoints, require at least 2 to make it useful
if (HasPortRDF && rdf_descriptor->Ports[i].ScalePointCount > 1)
param.data[j].hints |= PARAMETER_USES_SCALEPOINTS;
@@ -944,6 +945,9 @@ public:
m_active_before = m_active;
}

// -------------------------------------------------------------------
// Cleanup

void delete_buffers()
{
qDebug("LadspaPlugin::delete_buffers() - start");
@@ -956,6 +960,8 @@ public:
qDebug("LadspaPlugin::delete_buffers() - end");
}

// -------------------------------------------------------------------

bool init(const char* filename, const char* label, const LADSPA_RDF_Descriptor* rdf_descriptor_)
{
if (lib_open(filename))


+ 338
- 303
src/carla-backend/lv2.cpp
File diff suppressed because it is too large
View File


+ 2
- 2
src/carla-backend/sf2.cpp View File

@@ -671,8 +671,6 @@ public:
aout.count = aouts;
param.count = params;

reload_programs(true);

// plugin checks
m_hints &= ~(PLUGIN_IS_SYNTH | PLUGIN_USES_CHUNKS | PLUGIN_CAN_DRYWET | PLUGIN_CAN_VOLUME | PLUGIN_CAN_BALANCE);

@@ -680,6 +678,8 @@ public:
m_hints |= PLUGIN_CAN_VOLUME;
m_hints |= PLUGIN_CAN_BALANCE;

reload_programs(true);

x_client->activate();

qDebug("Sf2Plugin::reload() - end");


+ 16
- 2
src/carla-discovery/carla-discovery.cpp View File

@@ -33,7 +33,8 @@
#include <fluidsynth.h>
#endif

#define CARLA_NO_EXPORTS
#define CARLA_BACKEND_NO_EXPORTS
#define CARLA_BACKEND_NO_NAMESPACE
#include "carla_backend.h"

#define DISCOVERY_OUT(x, y) std::cout << "\ncarla-discovery::" << x << "::" << y << std::endl;
@@ -694,9 +695,22 @@ void do_lv2_check(const char* bundle)

lib_close(lib_handle);

// test if we support all required features
// test if we support all required ports and features
bool supported = true;

for (uint32_t j=0; j < rdf_descriptor->PortCount; j++)
{
const LV2_RDF_Port* const Port = &rdf_descriptor->Ports[j];
bool validPort = (LV2_IS_PORT_CONTROL(Port->Type) || LV2_IS_PORT_AUDIO(Port->Type) || LV2_IS_PORT_ATOM_SEQUENCE(Port->Type) || LV2_IS_PORT_CV(Port->Type) || LV2_IS_PORT_EVENT(Port->Type) || LV2_IS_PORT_MIDI_LL(Port->Type));

if (! (validPort || LV2_IS_PORT_OPTIONAL(Port->Properties)))
{
supported = false;
break;
}

}

for (uint32_t j=0; j < rdf_descriptor->FeatureCount; j++)
{
const LV2_RDF_Feature* const Feature = &rdf_descriptor->Features[j];


+ 3
- 3
src/carla-discovery/qtcreator/carla-discovery.pro View File

@@ -3,7 +3,7 @@
QT = core

CONFIG = link_pkgconfig qt warn_on debug
DEFINES = DEBUG VESTIGE_HEADER WANT_FLUIDSYNTH
DEFINES = DEBUG WANT_FLUIDSYNTH
PKGCONFIG = fluidsynth

TARGET = carla-discovery-qtcreator
@@ -20,8 +20,8 @@ HEADERS = \
../../carla-includes/lv2_rdf.h

INCLUDEPATH = .. \
../../carla-includes \
../../carla-includes/vestige
../../carla-backend \
../../carla-includes

LIBS = ../../carla-lilv/carla_lilv.a -ldl



+ 2
- 0
src/carla.py View File

@@ -2062,6 +2062,7 @@ class PluginWidget(QFrame, ui_carla_plugin.Ui_PluginWidget):
self.edit_dialog_geometry = None

if (self.pinfo['hints'] & PLUGIN_HAS_GUI):
print("Has gui")
gui_info = CarlaHost.get_gui_info(self.plugin_id)
self.gui_dialog_type = gui_info['type']

@@ -2084,6 +2085,7 @@ class PluginWidget(QFrame, ui_carla_plugin.Ui_PluginWidget):
self.b_gui.setEnabled(False)

else:
print("NOT gui")
self.gui_dialog = None
self.gui_dialog_type = GUI_NONE



Loading…
Cancel
Save