From 7be162b09c803b88c8c39ed497f0809e149a0430 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 19 Jan 2021 16:37:17 -0500 Subject: [PATCH] Rename RackUI to PrototypeUI. Change temp directory on Linux and Mac to /tmp. --- src/FaustEngine.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/FaustEngine.cpp b/src/FaustEngine.cpp index 041f7c7..6d6a987 100644 --- a/src/FaustEngine.cpp +++ b/src/FaustEngine.cpp @@ -50,7 +50,7 @@ extern rack::Plugin* pluginInstance; // UI handler for switches, knobs and lights -struct RackUI : public GenericUI { +struct PrototypeUI : public GenericUI { typedef std::function updateFunction; std::vector fConverters; @@ -81,10 +81,10 @@ struct RackUI : public GenericUI { } } - RackUI(): fScale("lin") + PrototypeUI(): fScale("lin") {} - virtual ~RackUI() { + virtual ~PrototypeUI() { for (auto& it : fConverters) delete it; } @@ -245,13 +245,13 @@ public: int run(const std::string& path, const std::string& script) override { #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 - std::string temp_cache = "/private/var/tmp/VCV_" + generateSHA1(script); + std::string temp_cache = "/tmp/VCVPrototype_" + generateSHA1(script); #elif defined ARCH_WIN char buf[MAX_PATH + 1] = {0}; 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 std::string error_msg; @@ -326,7 +326,7 @@ public: } // Setup UI - fDSP->buildUserInterface(&fRackUI); + fDSP->buildUserInterface(&fPrototypeUI); setFrameDivider(1); setBufferSize(kBufferSize); @@ -345,14 +345,14 @@ public: } // Update inputs controllers - for (auto& it : fRackUI.fUpdateFunIn) + for (auto& it : fPrototypeUI.fUpdateFunIn) it(block); // Compute samples fDSP->compute(block->bufferSize, fInputs, fOutputs); // Update output controllers - for (auto& it : fRackUI.fUpdateFunOut) + for (auto& it : fPrototypeUI.fUpdateFunOut) it(block); return 0; @@ -363,7 +363,7 @@ private: dsp* fDSP; FAUSTFLOAT** fInputs; FAUSTFLOAT** fOutputs; - RackUI fRackUI; + PrototypeUI fPrototypeUI; std::string fDSPLibraries; };