aboutsummaryrefslogtreecommitdiff
path: root/bundle
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-03-26 09:35:06 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-03-26 09:35:06 +0100
commitf2049633abe423d97a67fc36ed856a79fd711a68 (patch)
tree29ac17c106d61ae2d5a49d67ff917ab5b1a3c52d /bundle
parentcbcfc8023208bf8e5cb04da3797458d09b5f262e (diff)
downloadsynthpod-f2049633abe423d97a67fc36ed856a79fd711a68.tar.xz
beautify/fix last commit.
Diffstat (limited to 'bundle')
-rw-r--r--bundle/synthpod_bundle.c2
-rw-r--r--bundle/synthpod_bundle.h7
2 files changed, 9 insertions, 0 deletions
diff --git a/bundle/synthpod_bundle.c b/bundle/synthpod_bundle.c
index 4547e43e..16debe8a 100644
--- a/bundle/synthpod_bundle.c
+++ b/bundle/synthpod_bundle.c
@@ -32,6 +32,7 @@ instantiate(const LV2_Descriptor* descriptor, double rate,
plughandle_t *handle = calloc(1, sizeof(plughandle_t));
if(!handle)
return NULL;
+ mlock(handle, sizeof(plughandle_t));
return handle;
}
@@ -53,6 +54,7 @@ cleanup(LV2_Handle instance)
{
plughandle_t *handle = instance;
+ munlock(handle, sizeof(plughandle_t));
free(handle);
}
diff --git a/bundle/synthpod_bundle.h b/bundle/synthpod_bundle.h
index c879a66e..a5228117 100644
--- a/bundle/synthpod_bundle.h
+++ b/bundle/synthpod_bundle.h
@@ -18,6 +18,13 @@
#ifndef _SYNTHPOD_LV2_H
#define _SYNTHPOD_LV2_H
+#ifdef _WIN32
+# define mlock(...)
+# define munlock(...)
+#else
+# include <sys/mman.h> // mlock
+#endif
+
#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
// bundle uri