summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--src/gui/ConnectWindow.cpp9
-rw-r--r--src/gui/GladeFactory.cpp1
-rw-r--r--src/gui/wscript5
-rw-r--r--src/ingen/main.cpp13
-rw-r--r--src/module/Module.cpp2
-rw-r--r--wscript4
11 files changed, 33 insertions, 28 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)
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index 41d26f5b..e52e83ac 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -229,16 +229,17 @@ ConnectWindow::connect(bool existing)
SharedPtr<SigClientInterface> client(new SigClientInterface());
Ingen::Driver* (*new_driver)(
- Ingen::Engine& engine,
- std::string server_name,
- jack_client_t* jack_client) = NULL;
+ Ingen::Engine& engine,
+ const std::string server_name,
+ const std::string client_name,
+ void* jack_client) = NULL;
if (!world->local_engine->audio_driver()) {
bool found = _engine_jack_module->get_symbol(
"new_jack_audio_driver", (void*&)(new_driver));
if (found) {
world->local_engine->set_driver(DataType::AUDIO,
- SharedPtr<Driver>(new_driver(*world->local_engine, "default", 0)));
+ SharedPtr<Driver>(new_driver(*world->local_engine, "default", "", 0)));
}
}
diff --git a/src/gui/GladeFactory.cpp b/src/gui/GladeFactory.cpp
index 2b4d3ec9..81640d57 100644
--- a/src/gui/GladeFactory.cpp
+++ b/src/gui/GladeFactory.cpp
@@ -18,6 +18,7 @@
#include "GladeFactory.hpp"
#include <iostream>
#include <fstream>
+#include "config.h"
using namespace std;
diff --git a/src/gui/wscript b/src/gui/wscript
index 860a21a0..c8615198 100644
--- a/src/gui/wscript
+++ b/src/gui/wscript
@@ -43,7 +43,6 @@ def build(bld):
obj.source += 'UploadPatchWindow.cpp'
obj.includes = ['.', '..', '../common']
- obj.defines = 'INGEN_DATA_DIR=\\\"' + Params.g_options.datadir + '\\\"'
obj.name = 'libingen_gui'
obj.target = 'ingen_gui'
obj.inst_dir = 'lib/ingen'
@@ -65,7 +64,7 @@ def build(bld):
''')
# GUI runtime files
- install_files(Params.g_options.datadir, '', 'ingen_gui.glade')
- install_files(Params.g_options.datadir, '', 'ingen.svg')
+ install_files(bld.env()['DATADIR'], 'ingen', 'ingen_gui.glade')
+ install_files(bld.env()['DATADIR'], 'ingen', 'ingen.svg')
diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp
index e6f9a4ce..2f729ab9 100644
--- a/src/ingen/main.cpp
+++ b/src/ingen/main.cpp
@@ -192,13 +192,16 @@ main(int argc, char** argv)
/* Activate the engine, if we have one */
if (engine) {
Ingen::JackAudioDriver* (*new_driver)(
- Ingen::Engine& engine,
- std::string server_name,
- std::string client_name,
- jack_client_t* jack_client) = NULL;
- if (engine_jack_module->get_symbol("new_jack_audio_driver", (void*&)new_driver))
+ Ingen::Engine& engine,
+ const std::string server_name,
+ const std::string client_name,
+ void* jack_client) = NULL;
+ if (engine_jack_module->get_symbol("new_jack_audio_driver", (void*&)new_driver)) {
engine->set_driver(DataType::AUDIO, SharedPtr<Driver>(new_driver(
*engine, "default", args.jack_name_arg, NULL)));
+ } else {
+ cerr << Glib::Module::get_last_error() << endl;
+ }
engine->activate(args.parallelism_arg);
}
diff --git a/src/module/Module.cpp b/src/module/Module.cpp
index 02808206..16aecb66 100644
--- a/src/module/Module.cpp
+++ b/src/module/Module.cpp
@@ -53,11 +53,9 @@ load_module(const string& name)
string dir;
istringstream iss(module_path);
while (getline(iss, dir, ':')) {
-
string filename = Glib::Module::build_path(dir, name);
if (Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) {
module = new Glib::Module(filename, Glib::MODULE_BIND_LAZY);
-
if (*module) {
cerr << "Loaded module \"" << name << "\" from " << filename << endl;
return SharedPtr<Glib::Module>(module);
diff --git a/wscript b/wscript
index 13418de3..0570732d 100644
--- a/wscript
+++ b/wscript
@@ -50,11 +50,12 @@ def configure(conf):
fe.define = 'HAVE_POSIX_MEMALIGN'
fe.run()
- build_gui = conf.env['GLADEMM'] == 1 and conf.env['FLOWCANVAS'] == 1
+ build_gui = conf.env['HAVE_GLADEMM'] == 1 and conf.env['HAVE_FLOWCANVAS'] == 1
conf.define('INGEN_VERSION', INGEN_VERSION)
conf.define('BUILD_GUI', build_gui)
conf.define('HAVE_JACK_MIDI', conf.env['HAVE_JACK'] == 1)
+ conf.define('INGEN_DATA_DIR', os.path.normpath(conf.env['DATADIR'] + 'ingen'))
conf.write_config_header('config.h')
autowaf.print_summary(conf)
@@ -64,6 +65,7 @@ def configure(conf):
autowaf.display_msg("HTTP", str(conf.env['HAVE_SOUP'] == 1), 'YELLOW')
autowaf.display_msg("LV2", str(conf.env['HAVE_SLV2'] == 1), 'YELLOW')
autowaf.display_msg("LADSPA", str(conf.env['HAVE_LADSPA'] == 1), 'YELLOW')
+ autowaf.display_msg("Build GUI", str(conf.env['BUILD_GUI'] == 1), 'YELLOW')
print
def build(bld):