Browse Source

Cleanup

tags/1.9.4
falkTX 11 years ago
parent
commit
48373ce227
7 changed files with 120 additions and 81 deletions
  1. +2
    -2
      source/bridges/CarlaBridgeUI-LV2.cpp
  2. +5
    -5
      source/bridges/CarlaBridgeUI-VST.cpp
  3. +82
    -59
      source/discovery/carla-discovery.cpp
  4. +6
    -0
      source/includes/CarlaDefines.hpp
  5. +4
    -3
      source/libs/distrho/dgl/Makefile
  6. +9
    -0
      source/libs/lilv/Makefile
  7. +12
    -12
      source/utils/CarlaLv2Utils.hpp

+ 2
- 2
source/bridges/CarlaBridgeUI-LV2.cpp View File

@@ -761,7 +761,7 @@ public:
qDebug("%s", buf); qDebug("%s", buf);
break; break;
case CARLA_URI_MAP_ID_LOG_WARNING: case CARLA_URI_MAP_ID_LOG_WARNING:
qWarning("%s", buf);
carla_stderr("%s", buf);
break; break;
default: default:
break; break;
@@ -1068,7 +1068,7 @@ int main(int argc, char* argv[])


if (argc != 5) if (argc != 5)
{ {
qWarning("usage: %s <osc-url|\"null\"> <plugin-uri> <ui-uri> <ui-title>", argv[0]);
carla_stderr("usage: %s <osc-url|\"null\"> <plugin-uri> <ui-uri> <ui-title>", argv[0]);
return 1; return 1;
} }




+ 5
- 5
source/bridges/CarlaBridgeUI-VST.cpp View File

@@ -76,7 +76,7 @@ public:


if (! uiLibOpen(binary)) if (! uiLibOpen(binary))
{ {
qWarning("%s", uiLibError());
carla_stderr("%s", uiLibError());
return false; return false;
} }


@@ -129,7 +129,7 @@ public:
{ {
//effect->dispatcher(effect, effClose, 0, 0, nullptr, 0.0f); //effect->dispatcher(effect, effClose, 0, 0, nullptr, 0.0f);
//return false; //return false;
qWarning("VST UI failed to open, trying to init anyway...");
carla_stderr("VST UI failed to open, trying to init anyway...");
} }


// ----------------------------------------------------------------- // -----------------------------------------------------------------
@@ -339,7 +339,7 @@ public:
return -1; return -1;


// unimplemented // unimplemented
qWarning("CarlaVstClient::hostCanDo(\"%s\") - unknown feature", feature);
carla_stderr("CarlaVstClient::hostCanDo(\"%s\") - unknown feature", feature);
return 0; return 0;
} }


@@ -376,7 +376,7 @@ public:


if (self->effect != effect) if (self->effect != effect)
{ {
qWarning("CarlaVstClient::hostCallback() - host pointer mismatch: %p != %p", self->effect, effect);
carla_stderr("CarlaVstClient::hostCallback() - host pointer mismatch: %p != %p", self->effect, effect);
self = nullptr; self = nullptr;
} }
} }
@@ -540,7 +540,7 @@ int main(int argc, char* argv[])


if (argc != 4) if (argc != 4)
{ {
qWarning("usage: %s <osc-url|\"null\"> <binary> <ui-title>", argv[0]);
carla_stderr("usage: %s <osc-url|\"null\"> <binary> <ui-title>", argv[0]);
return 1; return 1;
} }




+ 82
- 59
source/discovery/carla-discovery.cpp View File

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


#include "CarlaBackend.hpp"
#include "CarlaBackendUtils.hpp"
#include "CarlaJuceUtils.hpp" #include "CarlaJuceUtils.hpp"
#include "CarlaLibUtils.hpp" #include "CarlaLibUtils.hpp"
#include "CarlaString.hpp" #include "CarlaString.hpp"
@@ -29,7 +29,6 @@
# include "dssi/dssi.h" # include "dssi/dssi.h"
#endif #endif
#ifdef WANT_LV2 #ifdef WANT_LV2
# include <QtCore/QDir>
# include <QtCore/QUrl> # include <QtCore/QUrl>
# include "CarlaLv2Utils.hpp" # include "CarlaLv2Utils.hpp"
#endif #endif
@@ -78,20 +77,18 @@ void print_lib_error(const char* const filename)


#ifdef WANT_VST #ifdef WANT_VST
// Check if plugin wants midi // Check if plugin wants midi
bool vstWantsMidi = false;
bool gVstWantsMidi = false;


// Check if plugin is processing // Check if plugin is processing
bool vstIsProcessing = false;
bool gVstIsProcessing = false;


// Current uniqueId for vst shell plugins // Current uniqueId for vst shell plugins
intptr_t vstCurrentUniqueId = 0;
intptr_t gVstCurrentUniqueId = 0;


// Supported Carla features // Supported Carla features
intptr_t vstHostCanDo(const char* const feature) intptr_t vstHostCanDo(const char* const feature)
{ {
#if DEBUG
qDebug("vstHostCanDo(\"%s\")", feature);
#endif
carla_debug("vstHostCanDo(\"%s\")", feature);


if (std::strcmp(feature, "supplyIdle") == 0) if (std::strcmp(feature, "supplyIdle") == 0)
return 1; return 1;
@@ -129,27 +126,21 @@ intptr_t vstHostCanDo(const char* const feature)
return 1; return 1;


// unimplemented // unimplemented
qWarning("vstHostCanDo(\"%s\") - unknown feature", feature);
carla_stderr("vstHostCanDo(\"%s\") - unknown feature", feature);
return 0; return 0;
} }


// Host-side callback // Host-side callback
intptr_t VSTCALLBACK vstHostCallback(AEffect* const effect, const int32_t opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt) intptr_t VSTCALLBACK vstHostCallback(AEffect* const effect, const int32_t opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt)
{ {
#if DEBUG
qDebug("vstHostCallback(%p, %s, %i, " P_INTPTR ", %p, %f)", effect, vstMasterOpcode2str(opcode), index, value, ptr, opt);
#endif
carla_debug("vstHostCallback(%p, %s, %i, " P_INTPTR ", %p, %f)", effect, vstMasterOpcode2str(opcode), index, value, ptr, opt);


intptr_t ret = 0; intptr_t ret = 0;


switch (opcode) switch (opcode)
{ {
case audioMasterAutomate: case audioMasterAutomate:
if (effect)
{
effect->setParameter(effect, index, opt);
ret = 1;
}
ret = 1;
break; break;


case audioMasterVersion: case audioMasterVersion:
@@ -157,19 +148,19 @@ intptr_t VSTCALLBACK vstHostCallback(AEffect* const effect, const int32_t opcode
break; break;


case audioMasterCurrentId: case audioMasterCurrentId:
ret = vstCurrentUniqueId;
ret = gVstCurrentUniqueId;
break; break;


#if ! VST_FORCE_DEPRECATED #if ! VST_FORCE_DEPRECATED
case audioMasterWantMidi: case audioMasterWantMidi:
vstWantsMidi = true;
gVstWantsMidi = true;
ret = 1; ret = 1;
break; break;
#endif #endif


case audioMasterGetTime: case audioMasterGetTime:
static VstTimeInfo_R timeInfo; static VstTimeInfo_R timeInfo;
memset(&timeInfo, 0, sizeof(VstTimeInfo_R)); //FIXME
carla_zeroStruct<VstTimeInfo_R>(timeInfo);
timeInfo.sampleRate = sampleRate; timeInfo.sampleRate = sampleRate;


// Tempo // Tempo
@@ -181,7 +172,7 @@ intptr_t VSTCALLBACK vstHostCallback(AEffect* const effect, const int32_t opcode
timeInfo.timeSigDenominator = 4; timeInfo.timeSigDenominator = 4;
timeInfo.flags |= kVstTimeSigValid; timeInfo.flags |= kVstTimeSigValid;


ret = (intptr_t)&timeInfo;
ret = getAddressFromPointer(&timeInfo);
break; break;


#if ! VST_FORCE_DEPRECATED #if ! VST_FORCE_DEPRECATED
@@ -213,7 +204,7 @@ intptr_t VSTCALLBACK vstHostCallback(AEffect* const effect, const int32_t opcode
#endif #endif


case audioMasterGetCurrentProcessLevel: case audioMasterGetCurrentProcessLevel:
ret = vstIsProcessing ? kVstProcessLevelRealtime : kVstProcessLevelUser;
ret = gVstIsProcessing ? kVstProcessLevelRealtime : kVstProcessLevelUser;
break; break;


case audioMasterGetAutomationState: case audioMasterGetAutomationState:
@@ -250,11 +241,16 @@ intptr_t VSTCALLBACK vstHostCallback(AEffect* const effect, const int32_t opcode
break; break;


default: default:
qDebug("vstHostCallback(%p, %s, %i, " P_INTPTR ", %p, %f)", effect, vstMasterOpcode2str(opcode), index, value, ptr, opt);
carla_debug("vstHostCallback(%p, %s, %i, " P_INTPTR ", %p, %f)", effect, vstMasterOpcode2str(opcode), index, value, ptr, opt);
break; break;
} }


return ret; return ret;

// unused
(void)index;
(void)value;
(void)opt;
} }
#endif #endif


@@ -539,8 +535,11 @@ void do_ladspa_check(void* const libHandle, const bool init)
} }
#else #else
DISCOVERY_OUT("error", "LADSPA support not available"); DISCOVERY_OUT("error", "LADSPA support not available");
Q_UNUSED(libHandle);
Q_UNUSED(init);
return;

// unused
(void)libHandle;
(void)init;
#endif #endif
} }


@@ -787,8 +786,11 @@ void do_dssi_check(void* const libHandle, const bool init)
} }
#else #else
DISCOVERY_OUT("error", "DSSI support not available"); DISCOVERY_OUT("error", "DSSI support not available");
Q_UNUSED(libHandle);
Q_UNUSED(init);
return;

// unused
(void)libHandle;
(void)init;
#endif #endif
} }


@@ -797,8 +799,8 @@ void do_lv2_check(const char* const bundle, const bool init)
#ifdef WANT_LV2 #ifdef WANT_LV2
// Convert bundle filename to URI // Convert bundle filename to URI
QString qBundle(QUrl::fromLocalFile(bundle).toString()); QString qBundle(QUrl::fromLocalFile(bundle).toString());
if (! qBundle.endsWith(QDir::separator()))
qBundle += QDir::separator();
if (! qBundle.endsWith(QChar(OS_SEP)))
qBundle += QChar(OS_SEP);


// Load bundle // Load bundle
Lilv::Node lilvBundle(lv2World.new_uri(qBundle.toUtf8().constData())); Lilv::Node lilvBundle(lv2World.new_uri(qBundle.toUtf8().constData()));
@@ -1008,8 +1010,11 @@ void do_lv2_check(const char* const bundle, const bool init)
} }
#else #else
DISCOVERY_OUT("error", "LV2 support not available"); DISCOVERY_OUT("error", "LV2 support not available");
Q_UNUSED(bundle);
Q_UNUSED(init);
return;

// unused
(void)bundle;
(void)init;
#endif #endif
} }


@@ -1048,40 +1053,40 @@ void do_vst_check(void* const libHandle, const bool init)


if (vstCategory == kPlugCategShell && effect->uniqueID == 0) if (vstCategory == kPlugCategShell && effect->uniqueID == 0)
{ {
if ((vstCurrentUniqueId = effect->dispatcher(effect, effShellGetNextPlugin, 0, 0, strBuf, 0.0f)) != 0)
if ((gVstCurrentUniqueId = effect->dispatcher(effect, effShellGetNextPlugin, 0, 0, strBuf, 0.0f)) != 0)
cName = strBuf; cName = strBuf;
} }
else else
{ {
vstCurrentUniqueId = effect->uniqueID;
gVstCurrentUniqueId = effect->uniqueID;


if (effect->dispatcher(effect, effGetEffectName, 0, 0, strBuf, 0.0f) == 1) if (effect->dispatcher(effect, effGetEffectName, 0, 0, strBuf, 0.0f) == 1)
cName = strBuf; cName = strBuf;
} }


memset(strBuf, 0, sizeof(char)*STR_MAX); //FIXME
carla_zeroMem(strBuf, sizeof(char)*STR_MAX);
if (effect->dispatcher(effect, effGetVendorString, 0, 0, strBuf, 0.0f) == 1) if (effect->dispatcher(effect, effGetVendorString, 0, 0, strBuf, 0.0f) == 1)
cVendor = strBuf; cVendor = strBuf;


// FIXME: Waves crash during processing // FIXME: Waves crash during processing
if (cVendor == "Waves") if (cVendor == "Waves")
memset((void*)&init, 0, sizeof(bool)); //FIXME
std::memset((void*)&init, 0, sizeof(bool)); //FIXME


if (vstCurrentUniqueId == 0)
if (gVstCurrentUniqueId == 0)
{ {
DISCOVERY_OUT("error", "Plugin doesn't have an Unique ID"); DISCOVERY_OUT("error", "Plugin doesn't have an Unique ID");
return; return;
} }


while (vstCurrentUniqueId != 0)
while (gVstCurrentUniqueId != 0)
{ {
memset(strBuf, 0, sizeof(char)*STR_MAX); //FIXME
carla_zeroMem(strBuf, sizeof(char)*STR_MAX);
if (effect->dispatcher(effect, effGetProductString, 0, 0, strBuf, 0.0f) == 1) if (effect->dispatcher(effect, effGetProductString, 0, 0, strBuf, 0.0f) == 1)
cProduct = strBuf; cProduct = strBuf;
else else
cProduct.clear(); cProduct.clear();


vstWantsMidi = false;
gVstWantsMidi = false;


int hints = 0; int hints = 0;
int audioIns = effect->numInputs; int audioIns = effect->numInputs;
@@ -1120,11 +1125,14 @@ void do_vst_check(void* const libHandle, const bool init)
effect->dispatcher(effect, effSetSampleRate, 0, 0, nullptr, sampleRate); effect->dispatcher(effect, effSetSampleRate, 0, 0, nullptr, sampleRate);
effect->dispatcher(effect, effSetProcessPrecision, 0, kVstProcessPrecision32, nullptr, 0.0f); effect->dispatcher(effect, effSetProcessPrecision, 0, kVstProcessPrecision32, nullptr, 0.0f);


effect->dispatcher(effect, effStopProcess, 0, 0, nullptr, 0.0f);
effect->dispatcher(effect, effMainsChanged, 0, 0, nullptr, 0.0f);

effect->dispatcher(effect, effMainsChanged, 0, 1, nullptr, 0.0f); effect->dispatcher(effect, effMainsChanged, 0, 1, nullptr, 0.0f);
effect->dispatcher(effect, effStartProcess, 0, 0, nullptr, 0.0f); effect->dispatcher(effect, effStartProcess, 0, 0, nullptr, 0.0f);


// Plugin might call wantMidi() during resume // Plugin might call wantMidi() during resume
if (midiIns == 0 && vstWantsMidi)
if (midiIns == 0 && gVstWantsMidi)
{ {
midiIns = 1; midiIns = 1;
midiTotal = midiIns + midiOuts; midiTotal = midiIns + midiOuts;
@@ -1148,12 +1156,15 @@ void do_vst_check(void* const libHandle, const bool init)
int32_t numEvents; int32_t numEvents;
intptr_t reserved; intptr_t reserved;
VstEvent* data[2]; VstEvent* data[2];
};
VstEventsFixed events;
VstMidiEvent midiEvents[2];


memset(&events, 0, sizeof(VstEventsFixed)); //FIXME
memset(midiEvents, 0, sizeof(VstMidiEvent)*2); //FIXME
VstEventsFixed()
: numEvents(0),
reserved(0),
data{0} {}
} events;

VstMidiEvent midiEvents[2];
carla_zeroMem(midiEvents, sizeof(VstMidiEvent)*2);


midiEvents[0].type = kVstMidiType; midiEvents[0].type = kVstMidiType;
midiEvents[0].byteSize = sizeof(VstMidiEvent); midiEvents[0].byteSize = sizeof(VstMidiEvent);
@@ -1173,7 +1184,7 @@ void do_vst_check(void* const libHandle, const bool init)


// processing // processing
{ {
vstIsProcessing = true;
gVstIsProcessing = true;


if (midiIns > 0) if (midiIns > 0)
effect->dispatcher(effect, effProcessEvents, 0, 0, &events, 0.0f); effect->dispatcher(effect, effProcessEvents, 0, 0, &events, 0.0f);
@@ -1198,7 +1209,7 @@ void do_vst_check(void* const libHandle, const bool init)
DISCOVERY_OUT("error", "Plugin doesn't have can't do process replacing"); DISCOVERY_OUT("error", "Plugin doesn't have can't do process replacing");
#endif #endif


vstIsProcessing = false;
gVstIsProcessing = false;
} }


effect->dispatcher(effect, effStopProcess, 0, 0, nullptr, 0.0f); effect->dispatcher(effect, effStopProcess, 0, 0, nullptr, 0.0f);
@@ -1218,7 +1229,7 @@ void do_vst_check(void* const libHandle, const bool init)
DISCOVERY_OUT("label", (const char*)cProduct); DISCOVERY_OUT("label", (const char*)cProduct);
DISCOVERY_OUT("maker", (const char*)cVendor); DISCOVERY_OUT("maker", (const char*)cVendor);
DISCOVERY_OUT("copyright", (const char*)cVendor); DISCOVERY_OUT("copyright", (const char*)cVendor);
DISCOVERY_OUT("unique_id", vstCurrentUniqueId);
DISCOVERY_OUT("unique_id", gVstCurrentUniqueId);
DISCOVERY_OUT("hints", hints); DISCOVERY_OUT("hints", hints);
DISCOVERY_OUT("audio.ins", audioIns); DISCOVERY_OUT("audio.ins", audioIns);
DISCOVERY_OUT("audio.outs", audioOuts); DISCOVERY_OUT("audio.outs", audioOuts);
@@ -1236,13 +1247,15 @@ void do_vst_check(void* const libHandle, const bool init)
break; break;


// request next Unique ID // request next Unique ID
intptr_t nextUniqueId = vstCurrentUniqueId;
intptr_t nextUniqueId = gVstCurrentUniqueId;


// FIXME: Waves sometimes return the same ID // FIXME: Waves sometimes return the same ID
while (nextUniqueId == vstCurrentUniqueId)
while (nextUniqueId == gVstCurrentUniqueId)
{ {
memset(strBuf, 0, sizeof(char)*STR_MAX); //FIXME
if ((vstCurrentUniqueId = effect->dispatcher(effect, effShellGetNextPlugin, 0, 0, strBuf, 0.0f)) != 0)
carla_zeroMem(strBuf, sizeof(char)*STR_MAX);
gVstCurrentUniqueId = effect->dispatcher(effect, effShellGetNextPlugin, 0, 0, strBuf, 0.0f);

if (gVstCurrentUniqueId != 0)
cName = strBuf; cName = strBuf;
} }
} }
@@ -1250,8 +1263,11 @@ void do_vst_check(void* const libHandle, const bool init)
effect->dispatcher(effect, effClose, 0, 0, nullptr, 0.0f); effect->dispatcher(effect, effClose, 0, 0, nullptr, 0.0f);
#else #else
DISCOVERY_OUT("error", "VST support not available"); DISCOVERY_OUT("error", "VST support not available");
Q_UNUSED(libHandle);
Q_UNUSED(init);
return;

// unused
(void)libHandle;
(void)init;
#endif #endif
} }


@@ -1323,6 +1339,7 @@ void do_fluidsynth_check(const char* const filename, const bool init)
// 16 channels // 16 channels
if (name.isNotEmpty()) if (name.isNotEmpty())
name += " (16 outputs)"; name += " (16 outputs)";

DISCOVERY_OUT("init", "-----------"); DISCOVERY_OUT("init", "-----------");
DISCOVERY_OUT("name", ""); DISCOVERY_OUT("name", "");
DISCOVERY_OUT("name", (const char*)name); DISCOVERY_OUT("name", (const char*)name);
@@ -1341,8 +1358,11 @@ void do_fluidsynth_check(const char* const filename, const bool init)
DISCOVERY_OUT("end", "------------"); DISCOVERY_OUT("end", "------------");
#else #else
DISCOVERY_OUT("error", "SF2 support not available"); DISCOVERY_OUT("error", "SF2 support not available");
Q_UNUSED(filename);
Q_UNUSED(init);
return;

// unused
(void)filename;
(void)init;
#endif #endif
} }


@@ -1375,8 +1395,11 @@ void do_linuxsampler_check(const char* const filename, const char* const stype,
LinuxSamplerScopedEngine::outputInfo(nullptr, 0, file.baseName().toUtf8().constData()); LinuxSamplerScopedEngine::outputInfo(nullptr, 0, file.baseName().toUtf8().constData());
#else #else
DISCOVERY_OUT("error", stype << " support not available"); DISCOVERY_OUT("error", stype << " support not available");
Q_UNUSED(filename);
Q_UNUSED(init);
return;

// unused
(void)filename;
(void)init;
#endif #endif
} }


@@ -1437,7 +1460,7 @@ int main(int argc, char* argv[])


if (argc != 3) if (argc != 3)
{ {
qWarning("usage: %s <type> </path/to/plugin>", argv[0]);
carla_stdout("usage: %s <type> </path/to/plugin>", argv[0]);
return 1; return 1;
} }




+ 6
- 0
source/includes/CarlaDefines.hpp View File

@@ -39,6 +39,12 @@
# define CARLA_OS_UNIX # define CARLA_OS_UNIX
#endif #endif


#ifdef CARLA_OS_WIN
# define OS_SEP '\\'
#else
# define OS_SEP '/'
#endif

// Check for C++11 support // Check for C++11 support
#if defined(HAVE_CPP11_SUPPORT) #if defined(HAVE_CPP11_SUPPORT)
# define CARLA_PROPER_CPP11_SUPPORT # define CARLA_PROPER_CPP11_SUPPORT


+ 4
- 3
source/libs/distrho/dgl/Makefile View File

@@ -8,6 +8,7 @@ include ../../../Makefile.mk


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


BUILD_C_FLAGS += -fvisibility=hidden -fPIC
BUILD_CXX_FLAGS += -fvisibility=hidden -fPIC -I. BUILD_CXX_FLAGS += -fvisibility=hidden -fPIC -I.


OBJS = \ OBJS = \
@@ -21,6 +22,8 @@ OBJS = \
src/Widget.cpp.o \ src/Widget.cpp.o \
src/Window.cpp.o src/Window.cpp.o


OBJSM = src/pugl/pugl_osx.m.o

OBJS_posix32 = \ OBJS_posix32 = \
src/App.cpp.posix32.o \ src/App.cpp.posix32.o \
src/Image.cpp.posix32.o \ src/Image.cpp.posix32.o \
@@ -65,8 +68,6 @@ OBJS_win64 = \
src/Widget.cpp.win64.o \ src/Widget.cpp.win64.o \
src/Window.cpp.win64.o src/Window.cpp.win64.o


OBJSM = src/pugl/pugl_osx.m.o

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


all: ../../dgl.a all: ../../dgl.a
@@ -96,7 +97,7 @@ win64: ../../dgl.win64.a
../../dgl.dll: $(OBJS) ../../dgl.dll: $(OBJS)
$(CXX) $^ -shared $(LINK_FLAGS) -lopengl32 -lgdi32 -o $@ $(CXX) $^ -shared $(LINK_FLAGS) -lopengl32 -lgdi32 -o $@


../../dgl.dylib: $(OBJS) $(OBJSM)
../../dgl.dylib: $(OBJS)
$(CXX) $^ -shared $(LINK_FLAGS) -framework Cocoa -framework OpenGL -o $@ $(CXX) $^ -shared $(LINK_FLAGS) -framework Cocoa -framework OpenGL -o $@


../../dgl.so: $(OBJS) ../../dgl.so: $(OBJS)


+ 9
- 0
source/libs/lilv/Makefile View File

@@ -48,6 +48,15 @@ win64: ../lilv.win64.a
../lilv.win64.a: $(OBJS_win64) ../lilv.win64.a: $(OBJS_win64)
$(AR) rs $@ $^ $(AR) rs $@ $^


../lilv.dll: $(OBJS)
$(CXX) $^ -shared $(LINK_FLAGS) -o $@

../lilv.dylib: $(OBJS)
$(CXX) $^ -shared $(LINK_FLAGS) -o $@

../lilv.so: $(OBJS)
$(CXX) $^ -shared $(LINK_FLAGS) -o $@

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


serd.c.o: serd.c serd.c.o: serd.c


+ 12
- 12
source/utils/CarlaLv2Utils.hpp View File

@@ -356,7 +356,7 @@ public:


if (! uriNode) if (! uriNode)
{ {
qWarning("Lv2WorldClass::getPlugin(\"%s\") - Failed to get node from uri", uri);
carla_stderr("Lv2WorldClass::getPlugin(\"%s\") - Failed to get node from uri", uri);
return nullptr; return nullptr;
} }


@@ -367,7 +367,7 @@ public:
} }
else else
{ {
qWarning("Lv2WorldClass::getPlugin(\"%s\") - Failed to get plugin", uri);
carla_stderr("Lv2WorldClass::getPlugin(\"%s\") - Failed to get plugin", uri);
lilv_node_free(uriNode); lilv_node_free(uriNode);
return nullptr; return nullptr;
} }
@@ -394,7 +394,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri)


if (! uri) if (! uri)
{ {
qWarning("lv2_rdf_new() - Invalid uri");
carla_stderr("lv2_rdf_new() - Invalid uri");
return nullptr; return nullptr;
} }


@@ -581,7 +581,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri)
rdfPort->Types |= LV2_PORT_OUTPUT; rdfPort->Types |= LV2_PORT_OUTPUT;


else else
qWarning("lv2_rdf_new(\"%s\") - port '%s' is not input or output", uri, rdfPort->Name);
carla_stderr("lv2_rdf_new(\"%s\") - port '%s' is not input or output", uri, rdfPort->Name);


// Data Type // Data Type
if (lilvPort.is_a(lv2World.port_control)) if (lilvPort.is_a(lv2World.port_control))
@@ -602,7 +602,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri)
if (bufferTypeNodes.contains(lv2World.atom_sequence)) if (bufferTypeNodes.contains(lv2World.atom_sequence))
rdfPort->Types |= LV2_PORT_ATOM_SEQUENCE; rdfPort->Types |= LV2_PORT_ATOM_SEQUENCE;
else else
qWarning("lv2_rdf_new(\"%s\") - port '%s' uses an unknown atom buffer type", uri, rdfPort->Name);
carla_stderr("lv2_rdf_new(\"%s\") - port '%s' uses an unknown atom buffer type", uri, rdfPort->Name);


Lilv::Nodes supportNodes(lilvPort.get_value(lv2World.atom_supports)); Lilv::Nodes supportNodes(lilvPort.get_value(lv2World.atom_supports));


@@ -612,7 +612,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri)
rdfPort->Types |= LV2_PORT_DATA_PATCH_MESSAGE; rdfPort->Types |= LV2_PORT_DATA_PATCH_MESSAGE;


if (! (supportNodes.contains(lv2World.midi_event) || supportNodes.contains(lv2World.patch_message))) if (! (supportNodes.contains(lv2World.midi_event) || supportNodes.contains(lv2World.patch_message)))
qWarning("lv2_rdf_new(\"%s\") - port '%s' is of atom type but doesn't support MIDI or messages", uri, rdfPort->Name);
carla_stderr("lv2_rdf_new(\"%s\") - port '%s' is of atom type but doesn't support MIDI or messages", uri, rdfPort->Name);
} }


else if (lilvPort.is_a(lv2World.port_event)) else if (lilvPort.is_a(lv2World.port_event))
@@ -622,7 +622,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri)
if (lilvPort.supports_event(lv2World.midi_event)) if (lilvPort.supports_event(lv2World.midi_event))
rdfPort->Types |= LV2_PORT_DATA_MIDI_EVENT; rdfPort->Types |= LV2_PORT_DATA_MIDI_EVENT;
else else
qWarning("lv2_rdf_new(\"%s\") - port '%s' is of event type but doesn't support MIDI", uri, rdfPort->Name);
carla_stderr("lv2_rdf_new(\"%s\") - port '%s' is of event type but doesn't support MIDI", uri, rdfPort->Name);
} }


else if (lilvPort.is_a(lv2World.port_midi)) else if (lilvPort.is_a(lv2World.port_midi))
@@ -632,7 +632,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri)
} }


else else
qWarning("lv2_rdf_new(\"%s\") - port '%s' is of unkown data type", uri, rdfPort->Name);
carla_stderr("lv2_rdf_new(\"%s\") - port '%s' is of unkown data type", uri, rdfPort->Name);
} }


// -------------------------------------- // --------------------------------------
@@ -712,7 +712,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri)
else if (std::strncmp(designation, LV2_PORT_GROUPS_PREFIX, std::strlen(LV2_PORT_GROUPS_PREFIX)) == 0) else if (std::strncmp(designation, LV2_PORT_GROUPS_PREFIX, std::strlen(LV2_PORT_GROUPS_PREFIX)) == 0)
pass(); pass();
else else
qWarning("lv2_rdf_new(\"%s\") - got unknown port designation '%s'", uri, designation);
carla_stderr("lv2_rdf_new(\"%s\") - got unknown port designation '%s'", uri, designation);
} }
} }
} }
@@ -740,7 +740,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri)
else if (std::strcmp(midiMapType, LV2_MIDI_Map__NRPN) == 0) else if (std::strcmp(midiMapType, LV2_MIDI_Map__NRPN) == 0)
rdfPort->MidiMap.Type = LV2_PORT_MIDI_MAP_NRPN; rdfPort->MidiMap.Type = LV2_PORT_MIDI_MAP_NRPN;
else else
qWarning("lv2_rdf_new(\"%s\") - got unknown port Midi-Map type '%s'", uri, midiMapType);
carla_stderr("lv2_rdf_new(\"%s\") - got unknown port Midi-Map type '%s'", uri, midiMapType);


rdfPort->MidiMap.Number = midiMapNumberNodes.get_first().as_int(); rdfPort->MidiMap.Number = midiMapNumberNodes.get_first().as_int();
} }
@@ -839,7 +839,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri)
else if (std::strcmp(unitUnit, LV2_UNITS__semitone12TET) == 0) else if (std::strcmp(unitUnit, LV2_UNITS__semitone12TET) == 0)
rdfPort->Unit.Unit = LV2_PORT_UNIT_SEMITONE; rdfPort->Unit.Unit = LV2_PORT_UNIT_SEMITONE;
else else
qWarning("lv2_rdf_new(\"%s\") - got unknown unit type '%s'", uri, unitUnit);
carla_stderr("lv2_rdf_new(\"%s\") - got unknown unit type '%s'", uri, unitUnit);
} }
} }


@@ -1057,7 +1057,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri)
else if (lilvUI.is_a(lv2World.ui_externalOld)) else if (lilvUI.is_a(lv2World.ui_externalOld))
rdfUI->Type.Value = LV2_UI_OLD_EXTERNAL; rdfUI->Type.Value = LV2_UI_OLD_EXTERNAL;
else else
qWarning("lv2_rdf_new(\"%s\") - got unknown UI type '%s'", uri, uiType);
carla_stderr("lv2_rdf_new(\"%s\") - got unknown UI type '%s'", uri, uiType);
} }


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


Loading…
Cancel
Save