summaryrefslogtreecommitdiff
path: root/drumgizmo/enginefactory.cc
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-01-22 08:55:43 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-02-09 09:03:15 +0100
commit0ace1d379dad2639e878664b115b636421a7baa4 (patch)
tree06ad4cb0e8a509be380760cbc82f367774f34b93 /drumgizmo/enginefactory.cc
parent2842232cf2074b32d5e7f6869d076dfe1692287a (diff)
added dummy io engines
Diffstat (limited to 'drumgizmo/enginefactory.cc')
-rw-r--r--drumgizmo/enginefactory.cc22
1 files changed, 18 insertions, 4 deletions
diff --git a/drumgizmo/enginefactory.cc b/drumgizmo/enginefactory.cc
index 4e9bc62..5fa230b 100644
--- a/drumgizmo/enginefactory.cc
+++ b/drumgizmo/enginefactory.cc
@@ -27,14 +27,18 @@
#include "enginefactory.h"
#include "jackclient.h"
-#define HAVE_INPUT_MIDIFILE 1
-#define HAVE_OUTPUT_WAVFILE 1
-#define HAVE_OUTPUT_ALSA 1
+#ifdef HAVE_INPUT_DUMMY
+#include "input/inputdummy.h"
+#endif
#ifdef HAVE_INPUT_MIDIFILE
#include "input/midifile.h"
#endif
+#ifdef HAVE_OUTPUT_DUMMY
+#include "output/outputdummy.h"
+#endif
+
#ifdef HAVE_OUTPUT_WAVFILE
#include "output/wavfile.h"
#endif
@@ -44,6 +48,11 @@
#endif
InputEnginePtr createInputEngine(std::string const & name) {
+#ifdef HAVE_INPUT_DUMMY
+ if (name == "dummy") {
+ return std::make_unique<DummyInputEngine>();
+ }
+#endif
#ifdef HAVE_INPUT_MIDIFILE
if (name == "midifile") {
return std::make_unique<MidifileInputEngine>();
@@ -57,6 +66,11 @@ InputEnginePtr createInputEngine(std::string const & name) {
}
OutputEnginePtr createOutputEngine(std::string const & name) {
+#ifdef HAVE_OUTPUT_DUMMY
+ if (name == "dummy") {
+ return std::make_unique<DummyOutputEngine>();
+ }
+#endif
#ifdef HAVE_OUTPUT_WAVFILE
if (name == "wavfile") {
return std::make_unique<WavfileOutputEngine>();
@@ -67,7 +81,7 @@ OutputEnginePtr createOutputEngine(std::string const & name) {
return std::make_unique<AlsaOutputEngine>();
}
#endif
-
+
// todo: add more engines
printf("Unsupported output engine: %s\n", name.c_str());