summaryrefslogtreecommitdiff
path: root/drumgizmo/output/jackaudio.cc
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-01-25 15:51:53 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-02-09 09:03:17 +0100
commitd3554736c13531898fb720b34772a595620e661a (patch)
tree85e6f76e2b37785405ddf6685801ab9e9f9125cb /drumgizmo/output/jackaudio.cc
parent100e2d3bd46f64df730c8a375559680c577036ef (diff)
reformatting fix
Diffstat (limited to 'drumgizmo/output/jackaudio.cc')
-rw-r--r--drumgizmo/output/jackaudio.cc41
1 files changed, 31 insertions, 10 deletions
diff --git a/drumgizmo/output/jackaudio.cc b/drumgizmo/output/jackaudio.cc
index 2c80080..f92f186 100644
--- a/drumgizmo/output/jackaudio.cc
+++ b/drumgizmo/output/jackaudio.cc
@@ -30,12 +30,17 @@
#include "jackaudio.h"
JackAudioOutputEngine::JackAudioOutputEngine(JackClient &client)
- : client(client), channels{}, sema{"jackaudio"}
+ : client(client)
+ , channels{}
+ , sema{"jackaudio"}
{
client.add(*this);
}
-JackAudioOutputEngine::~JackAudioOutputEngine() { client.remove(*this); }
+JackAudioOutputEngine::~JackAudioOutputEngine()
+{
+ client.remove(*this);
+}
bool JackAudioOutputEngine::init(Channels data)
{
@@ -61,7 +66,9 @@ bool JackAudioOutputEngine::init(Channels data)
return true;
}
-void JackAudioOutputEngine::setParm(std::string parm, std::string value) {}
+void JackAudioOutputEngine::setParm(std::string parm, std::string value)
+{
+}
bool JackAudioOutputEngine::start()
{
@@ -69,9 +76,13 @@ bool JackAudioOutputEngine::start()
return true;
}
-void JackAudioOutputEngine::stop() {}
+void JackAudioOutputEngine::stop()
+{
+}
-void JackAudioOutputEngine::pre(size_t nsamples) {}
+void JackAudioOutputEngine::pre(size_t nsamples)
+{
+}
void JackAudioOutputEngine::run(int ch, sample_t *samples, size_t nsamples)
{
@@ -81,7 +92,10 @@ void JackAudioOutputEngine::run(int ch, sample_t *samples, size_t nsamples)
}
}
-void JackAudioOutputEngine::post(size_t nsamples) { sema.wait(); }
+void JackAudioOutputEngine::post(size_t nsamples)
+{
+ sema.wait();
+}
void JackAudioOutputEngine::process(jack_nframes_t num_frames)
{
@@ -99,14 +113,21 @@ void JackAudioOutputEngine::process(jack_nframes_t num_frames)
sema.post();
}
-size_t JackAudioOutputEngine::getBufferSize() { return client.getBufferSize(); }
+size_t JackAudioOutputEngine::getBufferSize()
+{
+ return client.getBufferSize();
+}
-size_t JackAudioOutputEngine::samplerate() { return client.getSampleRate(); }
+size_t JackAudioOutputEngine::samplerate()
+{
+ return client.getSampleRate();
+}
JackAudioOutputEngine::Channel::Channel(JackClient &client,
- std::string const &name,
+ const std::string &name,
std::size_t buffer_size)
- : port{client, name, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput}, samples{}
+ : port{client, name, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput}
+ , samples{}
{
samples.resize(buffer_size);
}