-Updated CMake, DiskWriter and config
parent
611839a8f6
commit
1b93cc6978
|
@ -10,7 +10,7 @@ set (Tutorial_VERSION_MINOR 0)
|
||||||
option(BUILD_TESTS "Build test version" OFF)
|
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_FILES_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
// State save / load
|
// State save / load
|
||||||
#define DEBUG_STATE 1
|
#define DEBUG_STATE 1
|
||||||
|
|
||||||
|
// Jack print controller out MIDI
|
||||||
|
#define DEBUG_MIDI 1
|
||||||
|
|
||||||
/// GENERAL
|
/// GENERAL
|
||||||
#define NTRACKS 8
|
#define NTRACKS 8
|
||||||
|
|
|
@ -22,14 +22,28 @@ DiskWriter::DiskWriter()
|
||||||
{
|
{
|
||||||
session = cJSON_CreateObject();
|
session = cJSON_CreateObject();
|
||||||
sample = cJSON_CreateObject();
|
sample = cJSON_CreateObject();
|
||||||
|
|
||||||
|
sessionPath = getenv("HOME");
|
||||||
|
sessionName = "lupppSession";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void DiskWriter::initialize(std::string path, std::string name )
|
void DiskWriter::initialize(std::string path, std::string name )
|
||||||
{
|
{
|
||||||
sessionPath = getenv("HOME");
|
sessionPath = path;
|
||||||
sessionName = name;
|
sessionName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string DiskWriter::getLastSaveName()
|
||||||
|
{
|
||||||
|
return sessionName;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DiskWriter::getLastSavePath()
|
||||||
|
{
|
||||||
|
return sessionPath;
|
||||||
|
}
|
||||||
|
|
||||||
int DiskWriter::writeAudioBuffer(int track, int scene, AudioBuffer* ab )
|
int DiskWriter::writeAudioBuffer(int track, int scene, AudioBuffer* ab )
|
||||||
{
|
{
|
||||||
// get the filename
|
// get the filename
|
||||||
|
|
|
@ -37,6 +37,9 @@ class DiskWriter
|
||||||
|
|
||||||
/// flush the JSON to disk, finalizing the save
|
/// flush the JSON to disk, finalizing the save
|
||||||
int writeSession();
|
int writeSession();
|
||||||
|
|
||||||
|
std::string getLastSaveName();
|
||||||
|
std::string getLastSavePath();
|
||||||
|
|
||||||
#ifdef BUILD_TESTS
|
#ifdef BUILD_TESTS
|
||||||
int runTests();
|
int runTests();
|
||||||
|
|
|
@ -26,6 +26,8 @@ int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
bool runTests = false;
|
bool runTests = false;
|
||||||
bool stopAfterTest = false;
|
bool stopAfterTest = false;
|
||||||
|
if(runTests == stopAfterTest){} // warning
|
||||||
|
|
||||||
for(int i = 0; i < argc; i++)
|
for(int i = 0; i < argc; i++)
|
||||||
{
|
{
|
||||||
if ( strcmp(argv[i], "-test" ) == 0 ) {
|
if ( strcmp(argv[i], "-test" ) == 0 ) {
|
||||||
|
@ -35,6 +37,7 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// setup the environment
|
// setup the environment
|
||||||
AVOIDDENORMALS();
|
AVOIDDENORMALS();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue