summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/DSSINode.h2
-rw-r--r--src/libs/engine/Engine.cpp16
-rw-r--r--src/libs/engine/JackAudioDriver.cpp11
-rw-r--r--src/libs/engine/JackMidiDriver.cpp8
-rw-r--r--src/libs/engine/LashDriver.cpp8
-rw-r--r--src/libs/engine/Makefile.am22
-rw-r--r--src/libs/engine/OSCDriver.h83
-rw-r--r--src/libs/engine/OmInProcess.cpp4
-rw-r--r--src/libs/engine/events.h4
-rw-r--r--src/libs/engine/events/LashRestoreDoneEvent.h55
-rw-r--r--src/libs/engine/tests/Makefile.am4
11 files changed, 124 insertions, 93 deletions
diff --git a/src/libs/engine/DSSINode.h b/src/libs/engine/DSSINode.h
index ffe1a641..d569e720 100644
--- a/src/libs/engine/DSSINode.h
+++ b/src/libs/engine/DSSINode.h
@@ -18,7 +18,7 @@
#ifndef DSSINODE_H
#define DSSINODE_H
-#include <asoundlib.h>
+#include <alsa/asoundlib.h>
#include <dssi.h>
#include <lo/lo.h>
#include "LADSPANode.h"
diff --git a/src/libs/engine/Engine.cpp b/src/libs/engine/Engine.cpp
index e80bcafe..a2bfc757 100644
--- a/src/libs/engine/Engine.cpp
+++ b/src/libs/engine/Engine.cpp
@@ -40,10 +40,10 @@
#ifdef HAVE_JACK_MIDI
#include "JackMidiDriver.h"
#endif
-#ifdef HAVE_LASH
+/*#ifdef HAVE_LASH
#include "LashDriver.h"
-#endif
-using std::cout; using std::cerr; using std::endl;
+#endif*/
+using namespace std;
namespace Ingen {
@@ -56,11 +56,11 @@ Engine::Engine()
_broadcaster(new ClientBroadcaster()),
_object_store(new ObjectStore()),
_node_factory(new NodeFactory()),
-#ifdef HAVE_LASH
+/*#ifdef HAVE_LASH
_lash_driver(new LashDriver()),
-#else
+#else */
_lash_driver(NULL),
-#endif
+//#endif
_quit_flag(false),
_activated(false)
{
@@ -129,11 +129,11 @@ Engine::main()
bool
Engine::main_iteration()
{
-#ifdef HAVE_LASH
+/*#ifdef HAVE_LASH
// Process any pending LASH events
if (lash_driver->enabled())
lash_driver->process_events();
-#endif
+#endif*/
// Run the maid (garbage collector)
_maid->cleanup();
diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp
index 45f8616d..3f6f58c0 100644
--- a/src/libs/engine/JackAudioDriver.cpp
+++ b/src/libs/engine/JackAudioDriver.cpp
@@ -35,12 +35,11 @@
#include "DuplexPort.h"
#include "EventSource.h"
#include "AudioBuffer.h"
-#ifdef HAVE_LASH
+/*#ifdef HAVE_LASH
#include "LashDriver.h"
-#endif
-
-using std::cout; using std::cerr; using std::endl;
+#endif*/
+using namespace std;
namespace Ingen {
@@ -183,9 +182,9 @@ JackAudioDriver::activate()
exit(EXIT_FAILURE);
} else {
cout << "[JackAudioDriver] Activated Jack client." << endl;
-#ifdef HAVE_LASH
+/*#ifdef HAVE_LASH
_engine.lash_driver()->set_jack_client_name(jack_client_get_name(_client));
-#endif
+#endif*/
}
}
diff --git a/src/libs/engine/JackMidiDriver.cpp b/src/libs/engine/JackMidiDriver.cpp
index 0ec2170b..f8ed3064 100644
--- a/src/libs/engine/JackMidiDriver.cpp
+++ b/src/libs/engine/JackMidiDriver.cpp
@@ -15,22 +15,22 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "JackMidiDriver.h"
#include <iostream>
#include <cstdlib>
#include <pthread.h>
#include <raul/Maid.h>
#include <raul/midi_events.h>
#include "types.h"
+#include "JackMidiDriver.h"
#include "ThreadManager.h"
#include "AudioDriver.h"
#include "MidiBuffer.h"
#include "DuplexPort.h"
#include "jack_compat.h"
-#ifdef HAVE_LASH
+/*#ifdef HAVE_LASH
#include "LashDriver.h"
-#endif
-using std::cout; using std::cerr; using std::endl;
+#endif*/
+using namespace std;
namespace Ingen {
diff --git a/src/libs/engine/LashDriver.cpp b/src/libs/engine/LashDriver.cpp
index 72090e70..452af1f0 100644
--- a/src/libs/engine/LashDriver.cpp
+++ b/src/libs/engine/LashDriver.cpp
@@ -15,14 +15,14 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "LashDriver.h"
-#include "config.h"
#include <iostream>
#include <string>
#include <cassert>
+#include "config/config.h"
+#include "LashDriver.h"
+#include "App.h"
-using std::cerr; using std::cout; using std::endl;
-using std::string;
+using namespace std;
namespace Ingen {
diff --git a/src/libs/engine/Makefile.am b/src/libs/engine/Makefile.am
index 7b873c93..7ef0bdaf 100644
--- a/src/libs/engine/Makefile.am
+++ b/src/libs/engine/Makefile.am
@@ -5,9 +5,16 @@ MAINTAINERCLEANFILES = Makefile.in
moduledir = $(libdir)/ingen
module_LTLIBRARIES = libingen_engine.la
-libingen_engine_la_CXXFLAGS = @RAUL_CFLAGS@ @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ @LASH_CFLAGS@ @SLV2_CFLAGS@ -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs/engine/events
+libingen_engine_la_CXXFLAGS = \
+ -I$(top_srcdir)/slv2 \
+ -I$(top_srcdir)/raul \
+ -I$(top_srcdir)/ingen/src/common \
+ -I$(top_srcdir)/ingen/src/libs \
+ -I$(top_srcdir)/ingen/src/libs/engine/events \
+ @JACK_CFLAGS@ @LIBLO_CFLAGS@ @ALSA_CFLAGS@ @LASH_CFLAGS@ @GLIBMM_CFLAGS@
+
libingen_engine_la_LDFLAGS = -no-undefined -module -avoid-version
-libingen_engine_la_LIBADD = @RAUL_LIBS@ @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@
+libingen_engine_la_LIBADD = @RAUL_LIBS@ @JACK_LIBS@ @LIBLO_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@ @GLIBMM_LIBS@
AM_CFLAGS=-std=c99
@@ -91,6 +98,7 @@ libingen_engine_la_SOURCES = \
Driver.h \
AudioDriver.h \
MidiDriver.h \
+ OSCDriver.h \
instantiations.cpp \
events/RegisterClientEvent.h \
events/RegisterClientEvent.cpp \
@@ -200,9 +208,9 @@ libingen_engine_la_SOURCES += \
LV2Node.cpp
endif
-if WITH_LASH
-libingen_engine_la_SOURCES += \
- LashDriver.h \
- LashDriver.cpp
-endif
+#if WITH_LASH
+#libingen_engine_la_SOURCES += \
+# LashDriver.h \
+# LashDriver.cpp
+#endif
diff --git a/src/libs/engine/OSCDriver.h b/src/libs/engine/OSCDriver.h
new file mode 100644
index 00000000..08294783
--- /dev/null
+++ b/src/libs/engine/OSCDriver.h
@@ -0,0 +1,83 @@
+/* This file is part of Ingen.
+ * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
+ *
+ * Ingen is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef OSCDRIVER_H
+#define OSCDRIVER_H
+
+#include "types.h"
+#include "Driver.h"
+#include <iostream>
+#include "OSCBuffer.h"
+
+namespace Ingen {
+
+
+/** OSC driver abstract base class.
+ *
+ * \ingroup engine
+ */
+class OSCDriver : public Driver
+{
+public:
+ OSCDriver() : Driver(DataType::OSC) {}
+
+ /** Prepare events (however neccessary) for the specified block (realtime safe) */
+ virtual void prepare_block(const SampleCount block_start, const SampleCount block_end) = 0;
+};
+
+
+
+/** Dummy OSCDriver.
+ *
+ * Not abstract, all functions are dummies. One of these will be allocated and
+ * "used" if no working OSC driver is loaded. (Doing it this way as opposed to
+ * just making OSCDriver have dummy functions makes sure any existing OSCDriver
+ * derived class actually implements the required functions).
+ *
+ * \ingroup engine
+ */
+class DummyOSCDriver : public OSCDriver
+{
+public:
+ DummyOSCDriver() {
+ std::cout << "[DummyOSCDriver] Started Dummy OSC driver." << std::endl;
+ }
+
+ ~DummyOSCDriver() {}
+
+ void activate() {}
+ void deactivate() {}
+
+ bool is_activated() const { return false; }
+ bool is_enabled() const { return false; }
+
+ void enable() {}
+ void disable() {}
+
+ DriverPort* create_port(DuplexPort* patch_port) { return NULL; }
+
+ void add_port(DriverPort* port) {}
+ DriverPort* remove_port(const Raul::Path& path) { return NULL; }
+
+ void prepare_block(const SampleCount block_start, const SampleCount block_end) {}
+};
+
+
+
+} // namespace Ingen
+
+#endif // OSCDRIVER_H
diff --git a/src/libs/engine/OmInProcess.cpp b/src/libs/engine/OmInProcess.cpp
index 2096204e..6893ebe2 100644
--- a/src/libs/engine/OmInProcess.cpp
+++ b/src/libs/engine/OmInProcess.cpp
@@ -22,9 +22,9 @@
#include "Engine.h"
#include "OSCReceiver.h"
#include "JackAudioDriver.h"
-#ifdef HAVE_LASH
+/*#ifdef HAVE_LASH
#include "LashDriver.h"
-#endif
+#endif*/
extern "C"
{
diff --git a/src/libs/engine/events.h b/src/libs/engine/events.h
index f1f4e78b..05b1a148 100644
--- a/src/libs/engine/events.h
+++ b/src/libs/engine/events.h
@@ -50,10 +50,6 @@
#include "PingQueuedEvent.h"
#include "MidiLearnEvent.h"
-#ifdef HAVE_LASH
-#include "LashRestoreDoneEvent.h"
-#endif
-
#ifdef HAVE_DSSI
#include "DSSIUpdateEvent.h"
#include "DSSIControlEvent.h"
diff --git a/src/libs/engine/events/LashRestoreDoneEvent.h b/src/libs/engine/events/LashRestoreDoneEvent.h
deleted file mode 100644
index fd33d813..00000000
--- a/src/libs/engine/events/LashRestoreDoneEvent.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef LASHRESTOREDONEEVENT_H
-#define LASHRESTOREDONEEVENT_H
-
-#include "QueuedEvent.h"
-#include "LashDriver.h"
-#include "types.h"
-
-#include <iostream>
-using std::cerr;
-
-namespace Ingen {
-
-class Port;
-
-
-/** Notification from a client that the LASH session is finished restoring.
- *
- * This is a bit of a hack, but needed to defer notifying LASH of our
- * existance until all ports are created.
- *
- * \ingroup engine
- */
-class LashRestoreDoneEvent : public QueuedEvent
-{
-public:
- LashRestoreDoneEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) {}
-
- void post_process()
- {
- _responder->respond_ok();
- lash_driver->restore_finished();
- }
-};
-
-
-} // namespace Ingen
-
-#endif // LASHRESTOREDONEEVENT_H
diff --git a/src/libs/engine/tests/Makefile.am b/src/libs/engine/tests/Makefile.am
index 6faed130..9363f51f 100644
--- a/src/libs/engine/tests/Makefile.am
+++ b/src/libs/engine/tests/Makefile.am
@@ -1,7 +1,7 @@
if BUILD_UNIT_TESTS
-AM_CXXFLAGS = @JACK_CFLAGS@ @RAUL_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ -I../../common
-common_ldadd = @JACK_LIBS@ @RAUL_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ -lrt
+AM_CXXFLAGS = @JACK_CFLAGS@ @RAUL_CFLAGS@ @LIBLO_CFLAGS@ @ALSA_CFLAGS@ -I../../common
+common_ldadd = @JACK_LIBS@ @RAUL_LIBS@ @LIBLO_LIBS@ @ALSA_LIBS@ -lrt
node_tree_test_LDADD = $(common_ldadd)
noinst_PROGRAMS = node_tree_test