Browse Source

Implement save/load project in carla-single

tags/1.9.4
falkTX 11 years ago
parent
commit
531c95291e
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      source/bridges/CarlaBridgePlugin.cpp

+ 13
- 1
source/bridges/CarlaBridgePlugin.cpp View File

@@ -157,6 +157,11 @@ public:
fEngine = carla_get_standalone_engine();
fPlugin = fEngine->getPlugin(0);

fProjFileName = fPlugin->name();
fProjFileName += ".carxp";

fEngine->loadProject(fProjFileName);

fTimerId = startTimer(50);
}

@@ -169,12 +174,18 @@ public:

if (gSaveNow)
{
// TODO
gSaveNow = false;

CARLA_ASSERT(fEngine != nullptr);

if (fEngine != nullptr && fProjFileName.isNotEmpty())
fEngine->saveProject(fProjFileName);
}

if (gCloseNow)
{
gCloseNow = false;

if (fTimerId != 0)
{
killTimer(fTimerId);
@@ -340,6 +351,7 @@ private:
CarlaBackend::CarlaEngine* fEngine;
CarlaBackend::CarlaPlugin* fPlugin;

CarlaString fProjFileName;
int fTimerId;

void timerEvent(QTimerEvent* const event)


Loading…
Cancel
Save