Log ScopedActionLock action names

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-05-16 22:56:49 +02:00
parent 687e0e8a1b
commit 9bd0d06d11
No known key found for this signature in database
GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 25 additions and 2 deletions

View File

@ -790,7 +790,8 @@ ScopedActionLock::ScopedActionLock(CarlaEngine* const engine,
#ifndef CARLA_OS_WASM
#if defined(DEBUG) || defined(BUILD_BRIDGE)
// block wait for unlock on processing side
carla_stdout(ACTION_MSG_PREFIX "ScopedPluginAction(%i) - blocking START", pluginId);
carla_stdout(ACTION_MSG_PREFIX "ScopedPluginAction(%i|%i:%s) - blocking START",
pluginId, action, EnginePostAction2Str(action));
#endif
if (! pData->nextAction.postDone)
@ -816,7 +817,8 @@ 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|%i:%s) - blocking DONE",
pluginId, action, EnginePostAction2Str(action));
#endif
#endif

View File

@ -203,6 +203,27 @@ enum EnginePostAction {
#endif
};
static inline
const char* EnginePostAction2Str(const EnginePostAction action)
{
switch (action)
{
case kEnginePostActionNull:
return "kEnginePostActionNull";
case kEnginePostActionZeroCount:
return "kEnginePostActionZeroCount";
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH
case kEnginePostActionRemovePlugin:
return "kEnginePostActionRemovePlugin";
case kEnginePostActionSwitchPlugins:
return "kEnginePostActionSwitchPlugins";
#endif
}
carla_stderr("CarlaBackend::EnginePostAction2Str(%i) - invalid action", action);
return nullptr;
}
struct EngineNextAction {
EnginePostAction opcode;
uint pluginId;