aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2015-07-14 16:14:55 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2015-07-14 16:14:55 +0200
commit950d0a14f61787fdbbbe0da6216f65a17adfab43 (patch)
treec74c85a8a8ce0695b7b55a7c8b3d94ce5c4a708f /lib
parentceea5681ca0496961087bbd2a89d068d8a8cbc98 (diff)
downloadsynthpod-950d0a14f61787fdbbbe0da6216f65a17adfab43.tar.xz
prototype clock_sync.
Diffstat (limited to 'lib')
-rw-r--r--lib/CMakeLists.txt1
-rw-r--r--lib/synthpod_app.c8
-rw-r--r--lib/synthpod_app.h4
3 files changed, 12 insertions, 1 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index bbc17323..af89afdf 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -3,6 +3,7 @@ include_directories(${PROJECT_SOURCE_DIR}/eo_ui.lv2)
include_directories(${PROJECT_SOURCE_DIR}/zero_worker.lv2)
include_directories(${PROJECT_SOURCE_DIR}/zero_writer.lv2)
include_directories(${PROJECT_SOURCE_DIR}/system_port.lv2)
+include_directories(${PROJECT_SOURCE_DIR}/clock_sync.lv2)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/cjson)
add_definitions("-D_GNU_SOURCE=1") # asprintf
diff --git a/lib/synthpod_app.c b/lib/synthpod_app.c
index 28cd8235..091c5c95 100644
--- a/lib/synthpod_app.c
+++ b/lib/synthpod_app.c
@@ -34,7 +34,7 @@
#include <synthpod_app.h>
#include <synthpod_private.h>
-#define NUM_FEATURES 9
+#define NUM_FEATURES 10
#define MAX_SOURCES 32 // TODO how many?
#define MAX_MODS 512 // TODO how many?
@@ -564,6 +564,12 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, uint32_t uid)
mod->feature_list[nfeatures++].data = NULL;
}
+ if(app->driver->clock_sync_sched)
+ {
+ mod->feature_list[nfeatures].URI = CLOCK_SYNC__schedule;
+ mod->feature_list[nfeatures++].data = app->driver->clock_sync_sched;
+ }
+
assert(nfeatures <= NUM_FEATURES);
for(int i=0; i<nfeatures; i++)
diff --git a/lib/synthpod_app.h b/lib/synthpod_app.h
index 2078e2b4..f0e52ef0 100644
--- a/lib/synthpod_app.h
+++ b/lib/synthpod_app.h
@@ -32,6 +32,7 @@
#include <synthpod_common.h>
#include <system_port.h>
+#include <clock_sync.h>
typedef struct _sp_app_t sp_app_t;
typedef struct _sp_app_system_source_t sp_app_system_source_t;
@@ -87,6 +88,9 @@ struct _sp_app_driver_t {
// system_port
sp_system_port_add system_port_add;
sp_system_port_del system_port_del;
+
+ // clock_sync
+ Clock_Sync_Schedule *clock_sync_sched;
};
sp_app_t *