From 6253e37c2f0219d61193d0d405e7f23a4bae3287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gl=C3=B6ckner?= Date: Thu, 21 Jan 2016 18:00:28 +0100 Subject: Added AlsaOutputEngine --- drumgizmo/enginefactory.cc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'drumgizmo/enginefactory.cc') 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(); } +#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(); } +#endif +#ifdef HAVE_OUTPUT_ALSA + if (name == "alsa") { + return std::make_unique(); + } +#endif + // todo: add more engines printf("Unsupported output engine: %s\n", name.c_str()); -- cgit v1.2.3