Browse Source

Add Module::getPatchStorageDir().

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
46fff99244
2 changed files with 7 additions and 1 deletions
  1. +1
    -0
      include/engine/Module.hpp
  2. +6
    -1
      src/engine/Module.cpp

+ 1
- 0
include/engine/Module.hpp View File

@@ -222,6 +222,7 @@ struct Module {
Since the folder is created when this is called, do not call it frequently or in an audio/engine thread such as process().
*/
std::string createPatchStorageDir();
std::string getPatchStorageDir();

struct ProcessArgs {
/** The current sample rate in Hz. */


+ 6
- 1
src/engine/Module.cpp View File

@@ -83,12 +83,17 @@ void Module::config(int numParams, int numInputs, int numOutputs, int numLights)


std::string Module::createPatchStorageDir() {
std::string path = system::join(APP->patch->autosavePath, "modules", std::to_string(id));
std::string path = getPatchStorageDir();
system::createDirectories(path);
return path;
}


std::string Module::getPatchStorageDir() {
return system::join(APP->patch->autosavePath, "modules", std::to_string(id));
}


void Module::processBypass(const ProcessArgs& args) {
for (BypassRoute& bypassRoute : bypassRoutes) {
// Route input voltages to output


Loading…
Cancel
Save