summaryrefslogtreecommitdiff
path: root/drumgizmo/enginefactory.cc
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-01-22 11:59:00 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-02-09 09:03:16 +0100
commitef3a90f4ba8d65e8c210898c48acd3a07eafaf4c (patch)
tree0fdfe740b33f8f85eccb588f4577c1115a5d54be /drumgizmo/enginefactory.cc
parent06d43e27c412083cf704af48ea40e5c589504240 (diff)
added JackaudioOutputEngine
Diffstat (limited to 'drumgizmo/enginefactory.cc')
-rw-r--r--drumgizmo/enginefactory.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/drumgizmo/enginefactory.cc b/drumgizmo/enginefactory.cc
index c9f2ef3..8c40a28 100644
--- a/drumgizmo/enginefactory.cc
+++ b/drumgizmo/enginefactory.cc
@@ -49,7 +49,11 @@
#include "output/alsa.h"
#endif
-InputEnginePtr createInputEngine(std::string const & name) {
+#ifdef HAVE_OUTPUT_JACKAUDIO
+#include "output/jackaudio.h"
+#endif
+
+InputEnginePtr createInputEngine(JackClientPtr& jack, std::string const & name) {
#ifdef HAVE_INPUT_DUMMY
if (name == "dummy") {
return std::make_unique<DummyInputEngine>();
@@ -67,7 +71,7 @@ InputEnginePtr createInputEngine(std::string const & name) {
return nullptr;
}
-OutputEnginePtr createOutputEngine(std::string const & name) {
+OutputEnginePtr createOutputEngine(JackClientPtr& jack, std::string const & name) {
#ifdef HAVE_OUTPUT_DUMMY
if (name == "dummy") {
return std::make_unique<DummyOutputEngine>();
@@ -83,6 +87,14 @@ OutputEnginePtr createOutputEngine(std::string const & name) {
return std::make_unique<AlsaOutputEngine>();
}
#endif
+#ifdef HAVE_OUTPUT_JACKAUDIO
+ if (name == "jackaudio") {
+ if (jack.get() == nullptr) {
+ jack = std::make_unique<JackClient>();
+ }
+ return std::make_unique<JackaudioOutputEngine>(*jack);
+ }
+#endif
// todo: add more engines