summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/AudioBuffer.cpp3
-rw-r--r--src/engine/EventBuffer.cpp5
-rw-r--r--src/engine/JackAudioDriver.cpp13
-rw-r--r--src/engine/JackAudioDriver.hpp2
-rw-r--r--src/engine/wscript4
5 files changed, 14 insertions, 13 deletions
diff --git a/src/engine/AudioBuffer.cpp b/src/engine/AudioBuffer.cpp
index 5eb89855..c79d6f61 100644
--- a/src/engine/AudioBuffer.cpp
+++ b/src/engine/AudioBuffer.cpp
@@ -19,6 +19,7 @@
#include <cassert>
#include <stdlib.h>
#include "AudioBuffer.hpp"
+//#include "config.h"
using namespace std;
@@ -51,7 +52,7 @@ AudioBuffer::alloc_local_data(size_t size)
const int ret = posix_memalign((void**)&_local_data, 16, size * sizeof(Sample));
#else
_local_data = (Sample*)malloc(size * sizeof(Sample));
- int ret = (_local_data != NULL);
+ int ret = (_local_data != NULL) ? 0 : -1;
#endif
if (ret != 0) {
cerr << "[Buffer] Failed to allocate buffer. Aborting." << endl;
diff --git a/src/engine/EventBuffer.cpp b/src/engine/EventBuffer.cpp
index 45ef47f0..4d499496 100644
--- a/src/engine/EventBuffer.cpp
+++ b/src/engine/EventBuffer.cpp
@@ -21,6 +21,7 @@
#include "EventBuffer.hpp"
#include "lv2ext/lv2_event.h"
#include "lv2ext/lv2_event_helpers.h"
+//#include "config.h"
using namespace std;
@@ -44,10 +45,10 @@ EventBuffer::EventBuffer(size_t capacity)
int ret = posix_memalign((void**)&_local_buf, 16, sizeof(LV2_Event_Buffer) + capacity);
#else
_local_buf = (LV2_Event_Buffer*)malloc(sizeof(LV2_Event_Buffer) + capacity);
- int ret = (_local_buf == NULL);
+ int ret = (_local_buf != NULL) ? 0 : -1;
#endif
- if (ret) {
+ if (ret != 0) {
cerr << "Failed to allocate event buffer. Aborting." << endl;
exit(EXIT_FAILURE);
}
diff --git a/src/engine/JackAudioDriver.cpp b/src/engine/JackAudioDriver.cpp
index 14b1f11d..23577e33 100644
--- a/src/engine/JackAudioDriver.cpp
+++ b/src/engine/JackAudioDriver.cpp
@@ -387,13 +387,16 @@ JackAudioDriver::_buffer_size_cb(jack_nframes_t nframes)
} // namespace Ingen
+extern "C" {
+
Ingen::JackAudioDriver*
new_jack_audio_driver(
- Ingen::Engine& engine,
- std::string server_name,
- std::string client_name,
- jack_client_t* jack_client)
+ Ingen::Engine& engine,
+ const std::string server_name,
+ const std::string client_name,
+ void* jack_client)
{
- return new Ingen::JackAudioDriver(engine, server_name, client_name, jack_client);
+ return new Ingen::JackAudioDriver(engine, server_name, client_name, (jack_client_t*)jack_client);
}
+}
diff --git a/src/engine/JackAudioDriver.hpp b/src/engine/JackAudioDriver.hpp
index a0d81705..dc3f15df 100644
--- a/src/engine/JackAudioDriver.hpp
+++ b/src/engine/JackAudioDriver.hpp
@@ -189,7 +189,7 @@ extern "C" {
Ingen::Engine& engine,
std::string server_name = "",
std::string client_name = "",
- jack_client_t* jack_client = 0);
+ void* jack_client = 0);
}
#endif // JACKAUDIODRIVER_H
diff --git a/src/engine/wscript b/src/engine/wscript
index 6d62a976..1b677d3e 100644
--- a/src/engine/wscript
+++ b/src/engine/wscript
@@ -97,7 +97,6 @@ def build(bld):
obj.name = 'libingen_engine_http'
obj.target = 'ingen_engine_http'
obj.inst_dir = 'lib/ingen'
- obj.uselib_local = 'libingen_engine'
autowaf.use_lib(bld, obj, core_libs + ' SOUP')
if bld.env()['HAVE_LIBLO'] == 1:
@@ -107,7 +106,6 @@ def build(bld):
obj.name = 'libingen_engine_osc'
obj.target = 'ingen_engine_osc'
obj.inst_dir = 'lib/ingen'
- obj.uselib_local = 'libingen_engine'
autowaf.use_lib(bld, obj, core_libs + ' LIBLO')
if bld.env()['HAVE_JACK'] == 1:
@@ -117,7 +115,6 @@ def build(bld):
obj.name = 'libingen_engine_jack'
obj.target = 'ingen_engine_jack'
obj.inst_dir = 'lib/ingen'
- obj.uselib_local = 'libingen_engine'
autowaf.use_lib(bld, obj, core_libs + ' JACK')
# Lightweight ingen/lv2 wrapper
@@ -132,7 +129,6 @@ def build(bld):
obj.target = 'ingen.lv2/ingen_lv2'
#obj.inst_dir = 'lib/lv2/ingen.lv2'
obj.inst_var = 0
- obj.uselib_local = 'libingen_engine'
core_libs = 'GLIBMM GTHREAD LV2CORE SLV2 RAUL REDLANDMM'
autowaf.use_lib(bld, obj, core_libs)