summaryrefslogtreecommitdiff
path: root/drumgizmo/enginefactory.cc
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-01-21 18:00:28 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-02-09 09:02:18 +0100
commit6253e37c2f0219d61193d0d405e7f23a4bae3287 (patch)
tree28f687ca1327cec4cac848a80eb82cd8128ded27 /drumgizmo/enginefactory.cc
parent3ab30fd4168217894ee781cf93df522d3565cec8 (diff)
Added AlsaOutputEngine
Diffstat (limited to 'drumgizmo/enginefactory.cc')
-rw-r--r--drumgizmo/enginefactory.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/drumgizmo/enginefactory.cc b/drumgizmo/enginefactory.cc
index b6569e0..4e9bc62 100644
--- a/drumgizmo/enginefactory.cc
+++ b/drumgizmo/enginefactory.cc
@@ -26,13 +26,30 @@
*/
#include "enginefactory.h"
#include "jackclient.h"
+
+#define HAVE_INPUT_MIDIFILE 1
+#define HAVE_OUTPUT_WAVFILE 1
+#define HAVE_OUTPUT_ALSA 1
+
+#ifdef HAVE_INPUT_MIDIFILE
#include "input/midifile.h"
+#endif
+
+#ifdef HAVE_OUTPUT_WAVFILE
#include "output/wavfile.h"
+#endif
+
+#ifdef HAVE_OUTPUT_ALSA
+#include "output/alsa.h"
+#endif
InputEnginePtr createInputEngine(std::string const & name) {
+#ifdef HAVE_INPUT_MIDIFILE
if (name == "midifile") {
return std::make_unique<MidifileInputEngine>();
}
+#endif
+
// todo: add more engines
printf("Unsupported input engine: %s\n", name.c_str());
@@ -40,9 +57,17 @@ InputEnginePtr createInputEngine(std::string const & name) {
}
OutputEnginePtr createOutputEngine(std::string const & name) {
+#ifdef HAVE_OUTPUT_WAVFILE
if (name == "wavfile") {
return std::make_unique<WavfileOutputEngine>();
}
+#endif
+#ifdef HAVE_OUTPUT_ALSA
+ if (name == "alsa") {
+ return std::make_unique<AlsaOutputEngine>();
+ }
+#endif
+
// todo: add more engines
printf("Unsupported output engine: %s\n", name.c_str());