From 0ace1d379dad2639e878664b115b636421a7baa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gl=C3=B6ckner?= Date: Fri, 22 Jan 2016 08:55:43 +0100 Subject: added dummy io engines --- drumgizmo/enginefactory.cc | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'drumgizmo/enginefactory.cc') 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(); + } +#endif #ifdef HAVE_INPUT_MIDIFILE if (name == "midifile") { return std::make_unique(); @@ -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(); + } +#endif #ifdef HAVE_OUTPUT_WAVFILE if (name == "wavfile") { return std::make_unique(); @@ -67,7 +81,7 @@ OutputEnginePtr createOutputEngine(std::string const & name) { return std::make_unique(); } #endif - + // todo: add more engines printf("Unsupported output engine: %s\n", name.c_str()); -- cgit v1.2.3