summaryrefslogtreecommitdiff
path: root/drumgizmo/enginefactory.cc
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-01-29 14:05:53 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-02-09 09:03:17 +0100
commitd991ef4d089bc67710512f7d2f3ffba38663d2e8 (patch)
tree29e3215fba167aa7d21ed33c1d2b0c1d3041dfb9 /drumgizmo/enginefactory.cc
parent67ac001b417e0a5497f02e59cd33a2248964eac5 (diff)
Fixed style issues
Diffstat (limited to 'drumgizmo/enginefactory.cc')
-rw-r--r--drumgizmo/enginefactory.cc31
1 files changed, 17 insertions, 14 deletions
diff --git a/drumgizmo/enginefactory.cc b/drumgizmo/enginefactory.cc
index e88f679..63a17ba 100644
--- a/drumgizmo/enginefactory.cc
+++ b/drumgizmo/enginefactory.cc
@@ -31,9 +31,14 @@
EngineFactory::EngineFactory()
: input{}
- , output{}
+ , output
+{
+}
#ifdef USE_JACK
- , jack { nullptr }
+, jack
+{
+ nullptr
+}
#endif
{
// list available input engines
@@ -65,7 +70,7 @@ EngineFactory::EngineFactory()
#ifdef USE_JACK
void EngineFactory::prepareJack()
{
- if (jack == nullptr)
+ if(jack == nullptr)
{
jack = std::make_unique<JackClient>();
}
@@ -82,23 +87,22 @@ const std::list<std::string>& EngineFactory::getOutputEngines() const
return output;
}
-std::unique_ptr<AudioInputEngine>
-EngineFactory::createInput(const std::string& name)
+std::unique_ptr<AudioInputEngine> EngineFactory::createInput(const std::string& name)
{
#ifdef HAVE_INPUT_DUMMY
- if (name == "dummy")
+ if(name == "dummy")
{
return std::make_unique<DummyInputEngine>();
}
#endif
#ifdef HAVE_INPUT_MIDIFILE
- if (name == "midifile")
+ if(name == "midifile")
{
return std::make_unique<MidifileInputEngine>();
}
#endif
#ifdef HAVE_INPUT_JACKMIDI
- if (name == "jackmidi")
+ if(name == "jackmidi")
{
prepareJack();
return std::make_unique<JackMidiInputEngine>(*jack);
@@ -111,29 +115,28 @@ EngineFactory::createInput(const std::string& name)
return nullptr;
}
-std::unique_ptr<AudioOutputEngine>
-EngineFactory::createOutput(const std::string& name)
+std::unique_ptr<AudioOutputEngine> EngineFactory::createOutput(const std::string& name)
{
#ifdef HAVE_OUTPUT_DUMMY
- if (name == "dummy")
+ if(name == "dummy")
{
return std::make_unique<DummyOutputEngine>();
}
#endif
#ifdef HAVE_OUTPUT_WAVFILE
- if (name == "wavfile")
+ if(name == "wavfile")
{
return std::make_unique<WavfileOutputEngine>();
}
#endif
#ifdef HAVE_OUTPUT_ALSA
- if (name == "alsa")
+ if(name == "alsa")
{
return std::make_unique<AlsaOutputEngine>();
}
#endif
#ifdef HAVE_OUTPUT_JACKAUDIO
- if (name == "jackaudio")
+ if(name == "jackaudio")
{
prepareJack();
return std::make_unique<JackAudioOutputEngine>(*jack);