summaryrefslogtreecommitdiff
path: root/drumgizmo/jackclient.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/jackclient.cc
parent100e2d3bd46f64df730c8a375559680c577036ef (diff)
reformatting fix
Diffstat (limited to 'drumgizmo/jackclient.cc')
-rw-r--r--drumgizmo/jackclient.cc26
1 files changed, 17 insertions, 9 deletions
diff --git a/drumgizmo/jackclient.cc b/drumgizmo/jackclient.cc
index eb35bf6..042329c 100644
--- a/drumgizmo/jackclient.cc
+++ b/drumgizmo/jackclient.cc
@@ -32,11 +32,10 @@ JackProcess::~JackProcess() {}
// --------------------------------------------------------------------
-JackPort::JackPort(JackClient &client, std::string const &name,
+JackPort::JackPort(JackClient &client, const std::string &name,
const char *type, JackPortFlags flags)
- : client{client.client} // register jack port for given client
- ,
- port{jack_port_register(this->client, name.c_str(), type, flags, 0)}
+ : client{client.client} // register jack port for given client
+ , port{jack_port_register(this->client, name.c_str(), type, flags, 0)}
{
}
@@ -51,12 +50,15 @@ JackPort::~JackPort()
// --------------------------------------------------------------------
-int _wrap_jack_process(jack_nframes_t nframes, void *arg)
+static int _wrap_jack_process(jack_nframes_t nframes, void *arg)
{
return static_cast<JackClient *>(arg)->process(nframes);
}
-JackClient::JackClient() : client{nullptr}, processes{}, is_active{false}
+JackClient::JackClient()
+ : client{nullptr}
+ , processes{}
+ , is_active{false}
{
jack_status_t status;
client = jack_client_open("DrumGizmo", JackNullOption, &status);
@@ -71,9 +73,15 @@ JackClient::~JackClient()
}
}
-void JackClient::add(JackProcess &process) { processes.insert(&process); }
+void JackClient::add(JackProcess &process)
+{
+ processes.insert(&process);
+}
-void JackClient::remove(JackProcess &process) { processes.erase(&process); }
+void JackClient::remove(JackProcess &process)
+{
+ processes.erase(&process);
+}
void JackClient::activate()
{
@@ -86,7 +94,7 @@ void JackClient::activate()
int JackClient::process(jack_nframes_t num_frames)
{
- for (auto &ptr : processes)
+ for (auto& ptr : processes)
{
ptr->process(num_frames);
}