summaryrefslogtreecommitdiffstats
path: root/src/progs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-25 06:07:42 +0000
committerDavid Robillard <d@drobilla.net>2007-07-25 06:07:42 +0000
commit75911e8ae28f011727ce303961a1adb56643689d (patch)
treeed83fcfc6bf11a6c5d48ef2337f7458fe29ea7a3 /src/progs
parent68861e30d860010424112ebaacf960a7839a009a (diff)
downloadingen-75911e8ae28f011727ce303961a1adb56643689d.tar.gz
ingen-75911e8ae28f011727ce303961a1adb56643689d.tar.bz2
ingen-75911e8ae28f011727ce303961a1adb56643689d.zip
Fix running with ingen -eg.
Start basic framework of an Ingen "Core" system/library (in module library for now). git-svn-id: http://svn.drobilla.net/lad/ingen@624 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs')
-rw-r--r--src/progs/ingen/Makefile.am4
-rw-r--r--src/progs/ingen/main.cpp36
2 files changed, 15 insertions, 25 deletions
diff --git a/src/progs/ingen/Makefile.am b/src/progs/ingen/Makefile.am
index 7f84191e..9226d6aa 100644
--- a/src/progs/ingen/Makefile.am
+++ b/src/progs/ingen/Makefile.am
@@ -1,4 +1,4 @@
-AM_CXXFLAGS = -I$(top_srcdir)/raul -I$(top_srcdir)/ingen/src/common -I$(top_srcdir)/ingen/src/libs -DINGEN_MODULE_DIR=\"$(libdir)/ingen\" @GTHREAD_CFLAGS@ @GLIBMM_CFLAGS@
+AM_CXXFLAGS = -I$(top_srcdir)/slv2 -I$(top_srcdir)/raul -I$(top_srcdir)/ingen/src/common -I$(top_srcdir)/ingen/src/libs -DINGEN_MODULE_DIR=\"$(libdir)/ingen\" @GTHREAD_CFLAGS@ @GLIBMM_CFLAGS@
MAINTAINERCLEANFILES = Makefile.in
@@ -6,7 +6,7 @@ desktopfilesdir = $(datadir)/applications
dist_desktopfiles_DATA = ingen.desktop
bin_PROGRAMS = ingen
-ingen_LDADD = @RAUL_LIBS@ @GTHREAD_LIBS@ @GLIBMM_LIBS@ ../../libs/module/libingen_module.la
+ingen_LDADD = @SLV2_LIBS@ @RAUL_LIBS@ @GTHREAD_LIBS@ @GLIBMM_LIBS@ ../../libs/module/libingen_module.la
ingen_DEPENDENCIES = ../../libs/module/libingen_module.la
ingen_SOURCES = \
diff --git a/src/progs/ingen/main.cpp b/src/progs/ingen/main.cpp
index 68c0abdc..5f4070b9 100644
--- a/src/progs/ingen/main.cpp
+++ b/src/progs/ingen/main.cpp
@@ -27,7 +27,7 @@
#include <raul/Path.hpp>
#include <raul/RDFWorld.hpp>
#include <raul/SharedPtr.hpp>
-#include "module/Module.hpp"
+#include "module/module.h"
#include "engine/Engine.hpp"
#include "engine/QueuedEngineInterface.hpp"
#include "serialisation/Loader.hpp"
@@ -75,32 +75,20 @@ main(int argc, char** argv)
Glib::thread_init();
+ Ingen::Shared::World* world = Ingen::Shared::get_world();
+
/* Run engine */
if (args.engine_flag) {
engine_module = Ingen::Shared::load_module("ingen_engine");
if (engine_module) {
- /*if (args.engine_port_given) {
- bool (*launch_engine)(int) = NULL;
- if ( ! module->get_symbol("launch_osc_engine", (void*&)launch_engine))
- module.reset();
- else
- launch_engine(args.engine_port_arg);
-
- } else if (args.gui_given || args.load_given) {*/
- Engine* (*new_engine)() = NULL;
- if (engine_module->get_symbol("new_engine", (void*&)new_engine)) {
- engine = SharedPtr<Engine>(new_engine());
- //engine->start_jack_driver();
- //engine->start_osc_driver(args.engine_port_arg);
- } else {
- engine_module.reset();
- }
-
- /*} else {
- cerr << "Nonsense command line parameters, engine not loaded." << endl;
- }*/
+ Engine* (*new_engine)(Ingen::Shared::World* world) = NULL;
+ if (engine_module->get_symbol("new_engine", (void*&)new_engine)) {
+ engine = SharedPtr<Engine>(new_engine(world));
+ } else {
+ engine_module.reset();
+ }
} else {
cerr << "Unable to load engine module, engine not loaded." << endl;
cerr << "Try using src/set_dev_environment.sh, or setting INGEN_MODULE_PATH." << endl;
@@ -194,12 +182,12 @@ main(int argc, char** argv)
bool ran_gui = false;
if (args.gui_given) {
gui_module = Ingen::Shared::load_module("ingen_gui");
- void (*run)(int, char**, SharedPtr<Ingen::Engine>, SharedPtr<Shared::EngineInterface>) = NULL;
+ void (*run)(int, char**, Ingen::Shared::World*, SharedPtr<Ingen::Engine>, SharedPtr<Shared::EngineInterface>) = NULL;
bool found = gui_module->get_symbol("run", (void*&)run);
if (found) {
ran_gui = true;
- run(argc, argv, engine, engine_interface);
+ run(argc, argv, world, engine, engine_interface);
} else {
cerr << "Unable to find GUI module, GUI not loaded." << endl;
cerr << "Try using src/set_dev_environment.sh, or setting INGEN_MODULE_PATH." << endl;
@@ -224,6 +212,8 @@ main(int argc, char** argv)
engine.reset();
}
+ Ingen::Shared::destroy_world();
+
return 0;
}