-Updated CMake, DiskWriter and config

This commit is contained in:
Harry van Haaren 2013-09-18 11:46:25 +01:00
parent 611839a8f6
commit 1b93cc6978
6 changed files with 24 additions and 7 deletions

View file

@ -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)

View file

@ -1,5 +0,0 @@
#!/bin/bash
set -e
tup upd
gdb --dir=src/ ./luppp

View file

@ -23,6 +23,8 @@
// State save / load
#define DEBUG_STATE 1
// Jack print controller out MIDI
#define DEBUG_MIDI 1
/// GENERAL
#define NTRACKS 8

View file

@ -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

View file

@ -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();

View file

@ -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();