diff --git a/CMakeLists.txt b/CMakeLists.txt index 775d99b..372eb97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ set (Tutorial_VERSION_MINOR 0) option(BUILD_TESTS "Build test version" OFF) -set(CMAKE_VERBOSE_MAKEFILE on) +#set(CMAKE_VERBOSE_MAKEFILE on) #set(CMAKE_FILES_DIRECTORY ${CMAKE_BINARY_DIR}/bin) #set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) diff --git a/debug.sh b/debug.sh deleted file mode 100755 index 10d6041..0000000 --- a/debug.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -e -tup upd -gdb --dir=src/ ./luppp diff --git a/src/config.hxx b/src/config.hxx index 265893e..e01d7c0 100644 --- a/src/config.hxx +++ b/src/config.hxx @@ -23,6 +23,8 @@ // State save / load #define DEBUG_STATE 1 +// Jack print controller out MIDI +#define DEBUG_MIDI 1 /// GENERAL #define NTRACKS 8 diff --git a/src/diskwriter.cxx b/src/diskwriter.cxx index e56a848..94d82d5 100644 --- a/src/diskwriter.cxx +++ b/src/diskwriter.cxx @@ -22,14 +22,28 @@ DiskWriter::DiskWriter() { session = cJSON_CreateObject(); sample = cJSON_CreateObject(); + + sessionPath = getenv("HOME"); + sessionName = "lupppSession"; + }; void DiskWriter::initialize(std::string path, std::string name ) { - sessionPath = getenv("HOME"); + sessionPath = path; sessionName = name; } +std::string DiskWriter::getLastSaveName() +{ + return sessionName; +} + +std::string DiskWriter::getLastSavePath() +{ + return sessionPath; +} + int DiskWriter::writeAudioBuffer(int track, int scene, AudioBuffer* ab ) { // get the filename diff --git a/src/diskwriter.hxx b/src/diskwriter.hxx index 318fb41..e430ebe 100644 --- a/src/diskwriter.hxx +++ b/src/diskwriter.hxx @@ -37,6 +37,9 @@ class DiskWriter /// flush the JSON to disk, finalizing the save int writeSession(); + + std::string getLastSaveName(); + std::string getLastSavePath(); #ifdef BUILD_TESTS int runTests(); diff --git a/src/main.cxx b/src/main.cxx index d2aea92..1c2d868 100644 --- a/src/main.cxx +++ b/src/main.cxx @@ -26,6 +26,8 @@ int main(int argc, char** argv) { bool runTests = false; bool stopAfterTest = false; + if(runTests == stopAfterTest){} // warning + for(int i = 0; i < argc; i++) { if ( strcmp(argv[i], "-test" ) == 0 ) { @@ -35,6 +37,7 @@ int main(int argc, char** argv) } } + // setup the environment AVOIDDENORMALS();