From 76a8fe7d919316d980dacde86b783f92d2a0a9c7 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Tue, 3 Sep 2013 17:47:38 +0100 Subject: [PATCH] -LooperClip implements SaveAble interface --- src/looperclip.cxx | 1 + src/looperclip.hxx | 5 ++++- src/save/save.cxx | 5 +++++ src/worker.hxx | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/looperclip.cxx b/src/looperclip.cxx index b2e9714..bad62c4 100644 --- a/src/looperclip.cxx +++ b/src/looperclip.cxx @@ -11,6 +11,7 @@ extern Jack* jack; LooperClip::LooperClip(int t, int s) : + SaveAble(), track(t), scene(s) { diff --git a/src/looperclip.hxx b/src/looperclip.hxx index da607b7..543a1c8 100644 --- a/src/looperclip.hxx +++ b/src/looperclip.hxx @@ -3,6 +3,7 @@ #define LUPPP_LOOPER_CLIP_H #include +#include "save/saveable.hxx" #include "config.hxx" #include "gridlogic.hxx" @@ -23,8 +24,10 @@ class AudioBuffer; * Each clip has its properties like length and bars/beats, so the Looper knows * to dynamically stretch / process the audio appropriately. Controllers and the * UI are updated from this data. + * + * This class inherits from SaveAble to save its state. **/ -class LooperClip +class LooperClip : public SaveAble { public: LooperClip(int track, int scene); diff --git a/src/save/save.cxx b/src/save/save.cxx index 43be4c0..1ef85ab 100644 --- a/src/save/save.cxx +++ b/src/save/save.cxx @@ -1,6 +1,10 @@ #include "save.hxx" +#include + +using namespace std; + Save::Save() { @@ -8,6 +12,7 @@ Save::Save() void Save::registerSaveable(SaveAble* s) { + //cout << "Save::registerSaveable() " << s << endl; saveables.push_back( s ); } diff --git a/src/worker.hxx b/src/worker.hxx index 4aa7cda..bee7bf5 100644 --- a/src/worker.hxx +++ b/src/worker.hxx @@ -47,7 +47,7 @@ namespace Worker char* out = cJSON_Print(root); - cout << out << endl; + //cout << out << endl; } /// loads a sample into a new AudioBuffer, returning the buffer