summaryrefslogtreecommitdiff
path: root/drumgizmo/enginefactory.cc
diff options
context:
space:
mode:
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());