MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / run

Method run

plugins/Cardinal/src/Ildaeil.cpp:1509–1571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1507 }
1508
1509 bool run() override
1510 {
1511 if (fRunnerData.needsReinit)
1512 {
1513 fRunnerData.needsReinit = false;
1514
1515 {
1516 const MutexLocker cml(fPluginsMutex);
1517 fPlugins.clear();
1518 }
1519
1520 d_stdout("Will scan plugins now...");
1521
1522 const String& binaryPath(module->fBinaryPath);
1523
1524 if (binaryPath.isNotEmpty())
1525 {
1526 fBinaryType = BINARY_NATIVE;
1527
1528 fDiscoveryTool = binaryPath;
1529 fDiscoveryTool += DISTRHO_OS_SEP_STR "carla-discovery-native";
1530 #ifdef CARLA_OS_WIN
1531 fDiscoveryTool += ".exe";
1532 #endif
1533
1534 fRunnerData.handle = carla_plugin_discovery_start(fDiscoveryTool,
1535 fBinaryType,
1536 fPluginType,
1537 getPluginPath(fPluginType),
1538 _binaryPluginSearchCallback,
1539 _binaryPluginCheckCacheCallback,
1540 this);
1541
1542 }
1543
1544 if (fDrawingState == kDrawingLoading)
1545 {
1546 fDrawingState = kDrawingPluginList;
1547 fPluginSearchFirstShow = true;
1548 }
1549
1550 if (binaryPath.isEmpty() || (fRunnerData.handle == nullptr && !startNextDiscovery()))
1551 {
1552 d_stdout("Nothing found!");
1553 return false;
1554 }
1555 }
1556
1557 DISTRHO_SAFE_ASSERT_RETURN(fRunnerData.handle != nullptr, false);
1558
1559 if (carla_plugin_discovery_idle(fRunnerData.handle))
1560 return true;
1561
1562 // stop here
1563 carla_plugin_discovery_stop(fRunnerData.handle);
1564 fRunnerData.handle = nullptr;
1565
1566 if (startNextDiscovery())

Callers

nothing calls this directly

Calls 3

getPluginPathFunction · 0.85
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected