Browse Source

Really, really fix #115

tags/1.9.4
falkTX 10 years ago
parent
commit
8f2cdb156d
2 changed files with 27 additions and 23 deletions
  1. +3
    -4
      source/backend/CarlaStandalone.cpp
  2. +24
    -19
      source/backend/engine/CarlaEngine.cpp

+ 3
- 4
source/backend/CarlaStandalone.cpp View File

@@ -223,14 +223,13 @@ protected:

fClientId = clientId;

fProjectPath = juce::File::getCurrentWorkingDirectory().getFullPathName().toRawUTF8();
fProjectPath += OS_SEP_STR;
fProjectPath += projectPath;
fProjectPath = projectPath;
fProjectPath += ".carxp";

CARLA_SAFE_ASSERT_RETURN(gStandalone.engine != nullptr, 0);

gStandalone.engine->loadProject(fProjectPath);
if (juce::File(fProjectPath.buffer()).existsAsFile())
gStandalone.engine->loadProject(fProjectPath);

#ifndef BUILD_ANSI_TEST
lo_send_from(lo_message_get_source(msg), fOscServer, LO_TT_IMMEDIATE, "/reply", "ss", "/nsm/client/open", "OK");


+ 24
- 19
source/backend/engine/CarlaEngine.cpp View File

@@ -1108,38 +1108,43 @@ bool CarlaEngine::saveProject(const char* const filename)
}

#ifndef BUILD_BRIDGE
bool saveConnections = true;

// if we're running inside some session-manager, let them handle the connections
if (pData->options.processMode != ENGINE_PROCESS_MODE_PATCHBAY)
{
if (std::getenv("CARLA_DONT_MANAGE_CONNECTIONS") != nullptr || std::getenv("LADISH_APP_NAME") != nullptr || std::getenv("NSM_URL") != nullptr)
return true;
saveConnections = false;
}

if (const char* const* patchbayConns = getPatchbayConnections())
if (saveConnections)
{
if (! firstPlugin)
out << "\n";
if (const char* const* patchbayConns = getPatchbayConnections())
{
if (! firstPlugin)
out << "\n";

out << " <Patchbay>\n";
out << " <Patchbay>\n";

for (int i=0; patchbayConns[i] != nullptr && patchbayConns[i+1] != nullptr; ++i, ++i )
{
const char* const connSource(patchbayConns[i]);
const char* const connTarget(patchbayConns[i+1]);
for (int i=0; patchbayConns[i] != nullptr && patchbayConns[i+1] != nullptr; ++i, ++i )
{
const char* const connSource(patchbayConns[i]);
const char* const connTarget(patchbayConns[i+1]);

CARLA_SAFE_ASSERT_CONTINUE(connSource != nullptr && connSource[0] != '\0');
CARLA_SAFE_ASSERT_CONTINUE(connTarget != nullptr && connTarget[0] != '\0');
CARLA_SAFE_ASSERT_CONTINUE(connSource != nullptr && connSource[0] != '\0');
CARLA_SAFE_ASSERT_CONTINUE(connTarget != nullptr && connTarget[0] != '\0');

out << " <Connection>\n";
out << " <Source>" << connSource << "</Source>\n";
out << " <Target>" << connTarget << "</Target>\n";
out << " </Connection>\n";
out << " <Connection>\n";
out << " <Source>" << connSource << "</Source>\n";
out << " <Target>" << connTarget << "</Target>\n";
out << " </Connection>\n";

delete[] connSource;
delete[] connTarget;
}
delete[] connSource;
delete[] connTarget;
}

out << " </Patchbay>\n";
out << " </Patchbay>\n";
}
}
#endif



Loading…
Cancel
Save