summaryrefslogtreecommitdiff
path: root/drumgizmo/jackclient.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/jackclient.cc
parent67ac001b417e0a5497f02e59cd33a2248964eac5 (diff)
Fixed style issues
Diffstat (limited to 'drumgizmo/jackclient.cc')
-rw-r--r--drumgizmo/jackclient.cc29
1 files changed, 14 insertions, 15 deletions
diff --git a/drumgizmo/jackclient.cc b/drumgizmo/jackclient.cc
index 042329c..7277296 100644
--- a/drumgizmo/jackclient.cc
+++ b/drumgizmo/jackclient.cc
@@ -28,12 +28,14 @@
#include "jackclient.h"
-JackProcess::~JackProcess() {}
+JackProcess::~JackProcess()
+{
+}
// --------------------------------------------------------------------
-JackPort::JackPort(JackClient &client, const std::string &name,
- const char *type, JackPortFlags flags)
+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)}
{
@@ -41,7 +43,7 @@ JackPort::JackPort(JackClient &client, const std::string &name,
JackPort::~JackPort()
{
- if (port != nullptr)
+ if(port != nullptr)
{
assert(client != nullptr);
jack_port_unregister(client, port);
@@ -50,15 +52,12 @@ JackPort::~JackPort()
// --------------------------------------------------------------------
-static 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);
+ 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);
@@ -67,25 +66,25 @@ JackClient::JackClient()
JackClient::~JackClient()
{
- if (client != nullptr)
+ if(client != nullptr)
{
jack_client_close(client);
}
}
-void JackClient::add(JackProcess &process)
+void JackClient::add(JackProcess& process)
{
processes.insert(&process);
}
-void JackClient::remove(JackProcess &process)
+void JackClient::remove(JackProcess& process)
{
processes.erase(&process);
}
void JackClient::activate()
{
- if (!is_active)
+ if(!is_active)
{
jack_activate(client);
}
@@ -94,7 +93,7 @@ void JackClient::activate()
int JackClient::process(jack_nframes_t num_frames)
{
- for (auto& ptr : processes)
+ for(auto& ptr : processes)
{
ptr->process(num_frames);
}