Browse Source

Rename RackUI to PrototypeUI. Change temp directory on Linux and Mac to /tmp.

pull/57/head
Andrew Belt 4 years ago
parent
commit
7be162b09c
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      src/FaustEngine.cpp

+ 10
- 10
src/FaustEngine.cpp View File

@@ -50,7 +50,7 @@
extern rack::Plugin* pluginInstance; extern rack::Plugin* pluginInstance;


// UI handler for switches, knobs and lights // UI handler for switches, knobs and lights
struct RackUI : public GenericUI {
struct PrototypeUI : public GenericUI {
typedef std::function<void(ProcessBlock* block)> updateFunction; typedef std::function<void(ProcessBlock* block)> updateFunction;


std::vector<ConverterZoneControl*> fConverters; std::vector<ConverterZoneControl*> fConverters;
@@ -81,10 +81,10 @@ struct RackUI : public GenericUI {
} }
} }


RackUI(): fScale("lin")
PrototypeUI(): fScale("lin")
{} {}


virtual ~RackUI() {
virtual ~PrototypeUI() {
for (auto& it : fConverters) for (auto& it : fConverters)
delete it; delete it;
} }
@@ -245,13 +245,13 @@ public:


int run(const std::string& path, const std::string& script) override { int run(const std::string& path, const std::string& script) override {
#if defined ARCH_LIN #if defined ARCH_LIN
std::string temp_cache = "/var/tmp/VCV_" + generateSHA1(script);
std::string temp_cache = "/tmp/VCVPrototype_" + generateSHA1(script);
#elif defined ARCH_MAC #elif defined ARCH_MAC
std::string temp_cache = "/private/var/tmp/VCV_" + generateSHA1(script);
std::string temp_cache = "/tmp/VCVPrototype_" + generateSHA1(script);
#elif defined ARCH_WIN #elif defined ARCH_WIN
char buf[MAX_PATH + 1] = {0}; char buf[MAX_PATH + 1] = {0};
GetTempPath(sizeof(buf), buf); GetTempPath(sizeof(buf), buf);
std::string temp_cache = std::string(buf) + "/VCV_" + generateSHA1(script);
std::string temp_cache = std::string(buf) + "/VCVPrototype_" + generateSHA1(script);
#endif #endif
std::string error_msg; std::string error_msg;


@@ -326,7 +326,7 @@ public:
} }


// Setup UI // Setup UI
fDSP->buildUserInterface(&fRackUI);
fDSP->buildUserInterface(&fPrototypeUI);


setFrameDivider(1); setFrameDivider(1);
setBufferSize(kBufferSize); setBufferSize(kBufferSize);
@@ -345,14 +345,14 @@ public:
} }


// Update inputs controllers // Update inputs controllers
for (auto& it : fRackUI.fUpdateFunIn)
for (auto& it : fPrototypeUI.fUpdateFunIn)
it(block); it(block);


// Compute samples // Compute samples
fDSP->compute(block->bufferSize, fInputs, fOutputs); fDSP->compute(block->bufferSize, fInputs, fOutputs);


// Update output controllers // Update output controllers
for (auto& it : fRackUI.fUpdateFunOut)
for (auto& it : fPrototypeUI.fUpdateFunOut)
it(block); it(block);


return 0; return 0;
@@ -363,7 +363,7 @@ private:
dsp* fDSP; dsp* fDSP;
FAUSTFLOAT** fInputs; FAUSTFLOAT** fInputs;
FAUSTFLOAT** fOutputs; FAUSTFLOAT** fOutputs;
RackUI fRackUI;
PrototypeUI fPrototypeUI;
std::string fDSPLibraries; std::string fDSPLibraries;
}; };




Loading…
Cancel
Save