Browse Source

Clean up some debug messages

tags/v1.9.11
falkTX 6 years ago
parent
commit
6b92f3e1dc
7 changed files with 59 additions and 25 deletions
  1. +5
    -10
      source/backend/engine/CarlaEngine.cpp
  2. +4
    -0
      source/backend/engine/CarlaEngineInternal.cpp
  3. +11
    -11
      source/backend/plugin/CarlaPluginLV2.cpp
  4. +1
    -3
      source/backend/plugin/CarlaPluginSFZero.cpp
  5. +0
    -1
      source/frontend/carla_host.py
  6. +36
    -0
      source/modules/sfzero/sfzero/SFZSound.cpp
  7. +2
    -0
      source/modules/sfzero/sfzero/SFZSound.h

+ 5
- 10
source/backend/engine/CarlaEngine.cpp View File

@@ -1170,18 +1170,13 @@ float CarlaEngine::getOutputPeak(const uint pluginId, const bool isLeft) const n
void CarlaEngine::callback(const EngineCallbackOpcode action, const uint pluginId, const int value1, const int value2, const float value3, const char* const valueStr) noexcept void CarlaEngine::callback(const EngineCallbackOpcode action, const uint pluginId, const int value1, const int value2, const float value3, const char* const valueStr) noexcept
{ {
#ifdef DEBUG #ifdef DEBUG
if (action != ENGINE_CALLBACK_IDLE && action != ENGINE_CALLBACK_NOTE_ON && action != ENGINE_CALLBACK_NOTE_OFF)
carla_debug("CarlaEngine::callback(%i:%s, %i, %i, %i, %f, \"%s\")", action, EngineCallbackOpcode2Str(action), pluginId, value1, value2, value3, valueStr);
#endif

#ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH
if (pData->isIdling) if (pData->isIdling)
#else
if (pData->isIdling && action != ENGINE_CALLBACK_PATCHBAY_CLIENT_DATA_CHANGED)
carla_stdout("CarlaEngine::callback [while idling] (%i:%s, %i, %i, %i, %f, \"%s\")",
action, EngineCallbackOpcode2Str(action), pluginId, value1, value2, value3, valueStr);
else if (action != ENGINE_CALLBACK_IDLE && action != ENGINE_CALLBACK_NOTE_ON && action != ENGINE_CALLBACK_NOTE_OFF)
carla_debug("CarlaEngine::callback(%i:%s, %i, %i, %i, %f, \"%s\")",
action, EngineCallbackOpcode2Str(action), pluginId, value1, value2, value3, valueStr);
#endif #endif
{
carla_stdout("callback while idling (%i:%s, %i, %i, %i, %f, \"%s\")", action, EngineCallbackOpcode2Str(action), pluginId, value1, value2, value3, valueStr);
}


if (pData->callback != nullptr) if (pData->callback != nullptr)
{ {


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

@@ -682,8 +682,10 @@ ScopedActionLock::ScopedActionLock(CarlaEngine* const engine,


if (pData->nextAction.needsPost) if (pData->nextAction.needsPost)
{ {
#if defined(DEBUG) || defined(BUILD_BRIDGE)
// block wait for unlock on processing side // block wait for unlock on processing side
carla_stdout(ACTION_MSG_PREFIX "ScopedPluginAction(%i) - blocking START", pluginId); carla_stdout(ACTION_MSG_PREFIX "ScopedPluginAction(%i) - blocking START", pluginId);
#endif


bool engineStoppedWhileWaiting = false; bool engineStoppedWhileWaiting = false;


@@ -709,7 +711,9 @@ ScopedActionLock::ScopedActionLock(CarlaEngine* const engine,
} }
} }


#if defined(DEBUG) || defined(BUILD_BRIDGE)
carla_stdout(ACTION_MSG_PREFIX "ScopedPluginAction(%i) - blocking DONE", pluginId); carla_stdout(ACTION_MSG_PREFIX "ScopedPluginAction(%i) - blocking DONE", pluginId);
#endif


// check if anything went wrong... // check if anything went wrong...
if (! pData->nextAction.postDone) if (! pData->nextAction.postDone)


+ 11
- 11
source/backend/plugin/CarlaPluginLV2.cpp View File

@@ -5476,7 +5476,7 @@ public:


if (const char* const bridgeBinary = getUiBridgeBinary(uiType)) if (const char* const bridgeBinary = getUiBridgeBinary(uiType))
{ {
carla_stdout("Will use UI-Bridge, binary: \"%s\"", bridgeBinary);
carla_stdout("Will use UI-Bridge for '%s', binary: \"%s\"", pData->name, bridgeBinary);


CarlaString guiTitle(pData->name); CarlaString guiTitle(pData->name);
guiTitle += " (GUI)"; guiTitle += " (GUI)";
@@ -5491,7 +5491,7 @@ public:


if (iFinal == eQt4 || iFinal == eQt5 || iFinal == eGtk2 || iFinal == eGtk3) if (iFinal == eQt4 || iFinal == eQt5 || iFinal == eGtk2 || iFinal == eGtk3)
{ {
carla_stderr2("Failed to find UI bridge binary, cannot use UI");
carla_stderr2("Failed to find UI bridge binary for '%s', cannot use UI", pData->name);
fUI.rdfDescriptor = nullptr; fUI.rdfDescriptor = nullptr;
return; return;
} }
@@ -5550,44 +5550,44 @@ public:
switch (uiType) switch (uiType)
{ {
case LV2_UI_QT4: case LV2_UI_QT4:
carla_stdout("Will use LV2 Qt4 UI, NOT!");
carla_stdout("Will use LV2 Qt4 UI for '%s', NOT!", pData->name);
fUI.type = UI::TYPE_EMBED; fUI.type = UI::TYPE_EMBED;
break; break;
case LV2_UI_QT5: case LV2_UI_QT5:
carla_stdout("Will use LV2 Qt5 UI, NOT!");
carla_stdout("Will use LV2 Qt5 UI for '%s', NOT!", pData->name);
fUI.type = UI::TYPE_EMBED; fUI.type = UI::TYPE_EMBED;
break; break;
case LV2_UI_GTK2: case LV2_UI_GTK2:
carla_stdout("Will use LV2 Gtk2 UI, NOT!");
carla_stdout("Will use LV2 Gtk2 UI for '%s', NOT!", pData->name);
fUI.type = UI::TYPE_EMBED; fUI.type = UI::TYPE_EMBED;
break; break;
case LV2_UI_GTK3: case LV2_UI_GTK3:
carla_stdout("Will use LV2 Gtk3 UI, NOT!");
carla_stdout("Will use LV2 Gtk3 UI for '%s', NOT!", pData->name);
fUI.type = UI::TYPE_EMBED; fUI.type = UI::TYPE_EMBED;
break; break;
#ifdef CARLA_OS_MAC #ifdef CARLA_OS_MAC
case LV2_UI_COCOA: case LV2_UI_COCOA:
carla_stdout("Will use LV2 Cocoa UI");
carla_stdout("Will use LV2 Cocoa UI for '%s'", pData->name);
fUI.type = UI::TYPE_EMBED; fUI.type = UI::TYPE_EMBED;
break; break;
#endif #endif
#ifdef CARLA_OS_WIN #ifdef CARLA_OS_WIN
case LV2_UI_WINDOWS: case LV2_UI_WINDOWS:
carla_stdout("Will use LV2 Windows UI");
carla_stdout("Will use LV2 Windows UI for '%s'", pData->name);
fUI.type = UI::TYPE_EMBED; fUI.type = UI::TYPE_EMBED;
break; break;
#endif #endif
case LV2_UI_X11: case LV2_UI_X11:
#ifdef HAVE_X11 #ifdef HAVE_X11
carla_stdout("Will use LV2 X11 UI");
carla_stdout("Will use LV2 X11 UI for '%s'", pData->name);
#else #else
carla_stdout("Will use LV2 X11 UI, NOT!");
carla_stdout("Will use LV2 X11 UI for '%s', NOT!", pData->name);
#endif #endif
fUI.type = UI::TYPE_EMBED; fUI.type = UI::TYPE_EMBED;
break; break;
case LV2_UI_EXTERNAL: case LV2_UI_EXTERNAL:
case LV2_UI_OLD_EXTERNAL: case LV2_UI_OLD_EXTERNAL:
carla_stdout("Will use LV2 External UI");
carla_stdout("Will use LV2 External UI for '%s'", pData->name);
fUI.type = UI::TYPE_EXTERNAL; fUI.type = UI::TYPE_EXTERNAL;
break; break;
} }


+ 1
- 3
source/backend/plugin/CarlaPluginSFZero.cpp View File

@@ -702,9 +702,7 @@ public:
return false; return false;
} }


const String dump = sound->dump();
carla_stdout("SFZero sound information:");
std::puts(dump.toRawUTF8());
sound->dumpToConsole();


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




+ 0
- 1
source/frontend/carla_host.py View File

@@ -897,7 +897,6 @@ class HostWindow(QMainWindow):
self.ui.cb_transport_jack.setChecked(transportMode == ENGINE_TRANSPORT_MODE_JACK) self.ui.cb_transport_jack.setChecked(transportMode == ENGINE_TRANSPORT_MODE_JACK)
self.ui.cb_transport_jack.setEnabled(driverName == "JACK" and processMode != ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS) self.ui.cb_transport_jack.setEnabled(driverName == "JACK" and processMode != ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS)


print("transport extra! ", self.host.transportExtra)
if self.ui.cb_transport_link.isEnabled(): if self.ui.cb_transport_link.isEnabled():
self.ui.cb_transport_link.setChecked(":link:" in self.host.transportExtra) self.ui.cb_transport_link.setChecked(":link:" in self.host.transportExtra)




+ 36
- 0
source/modules/sfzero/sfzero/SFZSound.cpp View File

@@ -177,4 +177,40 @@ water::String Sound::dump()
return info; return info;
} }


void Sound::dumpToConsole()
{
const water::String filename(file_.getFileNameWithoutExtension());

const water::StringArray& errors(getErrors());
const water::StringArray& warnings(getWarnings());

const int numErrors = errors.size();
const int numWarnings = warnings.size();

if (numErrors == 0 && numWarnings == 0)
{
carla_stdout("SFZ '%s' loaded without errors or warnings, nice! :)", filename.toRawUTF8());
return;
}

if (numErrors != 0)
{
carla_stdout("SFZ '%s' loaded with %i errors and %i warnings:", filename.toRawUTF8(), numErrors, numWarnings);

if (numWarnings != 0)
carla_stdout("Errors:");

carla_stdout("%s", errors.joinIntoString("\n").toRawUTF8());

if (numWarnings != 0)
{
carla_stdout("Warnings:");
carla_stdout("%s", warnings.joinIntoString("\n").toRawUTF8());
}
}

carla_stdout("SFZ '%s' loaded without errors, but has %i warnings:", filename.toRawUTF8(), numWarnings);
carla_stdout("%s", warnings.joinIntoString("\n").toRawUTF8());
}

} }

+ 2
- 0
source/modules/sfzero/sfzero/SFZSound.h View File

@@ -52,6 +52,8 @@ public:
const water::StringArray &getWarnings() { return warnings_; } const water::StringArray &getWarnings() { return warnings_; }


water::String dump(); water::String dump();
void dumpToConsole();

water::Array<Region *> &getRegions() { return regions_; } water::Array<Region *> &getRegions() { return regions_; }
water::File &getFile() { return file_; } water::File &getFile() { return file_; }




Loading…
Cancel
Save