summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-14 05:11:04 +0000
committerDavid Robillard <d@drobilla.net>2012-05-14 05:11:04 +0000
commitbf7116520bc723980edb1120eaa66455a4c66ca5 (patch)
treedb8320d389e5ecdecbf7df8efbb3962f5a851648 /src/server
parent1952ad39639b620a8ce43b0b0edf5c1283e5e8c5 (diff)
downloadingen-bf7116520bc723980edb1120eaa66455a4c66ca5.tar.gz
ingen-bf7116520bc723980edb1120eaa66455a4c66ca5.tar.bz2
ingen-bf7116520bc723980edb1120eaa66455a4c66ca5.zip
Tidy.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4410 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server')
-rw-r--r--src/server/AudioBuffer.cpp16
-rw-r--r--src/server/ControlBindings.cpp4
-rw-r--r--src/server/DuplexPort.cpp43
-rw-r--r--src/server/InternalPlugin.cpp5
-rw-r--r--src/server/InternalPlugin.hpp5
-rw-r--r--src/server/JackDriver.cpp22
-rw-r--r--src/server/LV2Info.cpp4
-rw-r--r--src/server/LV2Node.cpp23
-rw-r--r--src/server/LV2Plugin.cpp2
-rw-r--r--src/server/NodeImpl.cpp2
-rw-r--r--src/server/ObjectSender.cpp2
-rw-r--r--src/server/PatchImpl.cpp18
-rw-r--r--src/server/PatchPlugin.hpp9
-rw-r--r--src/server/PortImpl.cpp4
-rw-r--r--src/server/PostProcessor.cpp2
-rw-r--r--src/server/events/Connect.cpp17
-rw-r--r--src/server/events/Connect.hpp4
-rw-r--r--src/server/events/CreateNode.cpp4
-rw-r--r--src/server/events/CreatePatch.cpp2
-rw-r--r--src/server/events/CreatePort.cpp9
-rw-r--r--src/server/events/Delete.hpp4
-rw-r--r--src/server/events/Disconnect.hpp4
-rw-r--r--src/server/events/Move.cpp2
-rw-r--r--src/server/events/SetPortValue.cpp2
-rw-r--r--src/server/internals/Controller.cpp2
-rw-r--r--src/server/internals/Controller.hpp13
-rw-r--r--src/server/internals/Delay.cpp38
-rw-r--r--src/server/internals/Delay.hpp13
-rw-r--r--src/server/internals/Note.cpp25
-rw-r--r--src/server/internals/Note.hpp13
-rw-r--r--src/server/internals/Trigger.cpp15
-rw-r--r--src/server/internals/Trigger.hpp13
-rw-r--r--src/server/util.hpp2
33 files changed, 169 insertions, 174 deletions
diff --git a/src/server/AudioBuffer.cpp b/src/server/AudioBuffer.cpp
index 476bdf07..f08e0e45 100644
--- a/src/server/AudioBuffer.cpp
+++ b/src/server/AudioBuffer.cpp
@@ -145,25 +145,21 @@ AudioBuffer::copy(Context& context, const Buffer* src)
return;
}
- // Control => Control
if (src_abuf->is_control() == is_control()) {
+ // Control => Control
Buffer::copy(context, src);
-
- // Audio => Audio
} else if (!src_abuf->is_control() && !is_control()) {
+ // Audio => Audio
copy(src_abuf->data(),
- context.offset(), context.offset() + context.nframes() - 1);
-
- // Audio => Control
+ context.offset(), context.offset() + context.nframes() - 1);
} else if (!src_abuf->is_control() && is_control()) {
+ // Audio => Control
data()[0] = src_abuf->data()[context.offset()];
-
- // Control => Audio
} else if (src_abuf->is_control() && !is_control()) {
+ // Control => Audio
data()[context.offset()] = src_abuf->data()[0];
-
- // Control => Audio or Audio => Control
} else {
+ // Control => Audio or Audio => Control
set_block(src_abuf->data()[0], 0, nframes());
}
}
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp
index 07470b8f..a9c0c546 100644
--- a/src/server/ControlBindings.cpp
+++ b/src/server/ControlBindings.cpp
@@ -227,7 +227,7 @@ ControlBindings::port_value_to_control(PortImpl* port,
if (normal < 0.0f) {
LOG(Raul::warn) << "Value " << value << " (normal " << normal << ") for "
- << port->path() << " out of range" << endl;
+ << port->path() << " out of range" << endl;
normal = 0.0f;
}
@@ -266,7 +266,7 @@ ControlBindings::set_port_value(ProcessContext& context,
for (uint32_t v = 0; v < port->poly(); ++v)
reinterpret_cast<AudioBuffer*>(port->buffer(v).get())->set_value(
- port_value.get_float(), context.start(), context.start());
+ port_value.get_float(), context.start(), context.start());
const Notification note = Notification::make(
Notification::PORT_VALUE, context.start(), port, port_value);
diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp
index 7da3dd5e..ca555e60 100644
--- a/src/server/DuplexPort.cpp
+++ b/src/server/DuplexPort.cpp
@@ -32,18 +32,17 @@ using namespace std;
namespace Ingen {
namespace Server {
-DuplexPort::DuplexPort(
- BufferFactory& bufs,
- NodeImpl* parent,
- const string& name,
- uint32_t index,
- bool polyphonic,
- uint32_t poly,
- PortType type,
- LV2_URID buffer_type,
- const Raul::Atom& value,
- size_t buffer_size,
- bool is_output)
+DuplexPort::DuplexPort(BufferFactory& bufs,
+ NodeImpl* parent,
+ const string& name,
+ uint32_t index,
+ bool polyphonic,
+ uint32_t poly,
+ PortType type,
+ LV2_URID buffer_type,
+ const Raul::Atom& value,
+ size_t buffer_size,
+ bool is_output)
: PortImpl(bufs, parent, name, index, poly, type, buffer_type, value, buffer_size)
, InputPort(bufs, parent, name, index, poly, type, buffer_type, value, buffer_size)
, OutputPort(bufs, parent, name, index, poly, type, buffer_type, value, buffer_size)
@@ -71,15 +70,17 @@ DuplexPort::get_buffers(Context& context,
void
DuplexPort::pre_process(Context& context)
{
- // If we're a patch output, we're an input from the internal perspective.
- // Prepare buffers for write (so plugins can deliver to them)
if (_is_output) {
- for (uint32_t v = 0; v < _poly; ++v)
+ /* This is a patch output, which is an input from the internal
+ perspective. Prepare buffers for write so plugins can deliver to
+ them */
+ for (uint32_t v = 0; v < _poly; ++v) {
_buffers->at(v)->prepare_write(context);
-
- // If we're a patch input, were an output from the internal perspective.
- // Do whatever a normal node's input port does to prepare input for reading.
+ }
} else {
+ /* This is a a patch input, which is an output from the internal
+ perspective. Do whatever a normal node's input port does to prepare
+ input for reading. */
InputPort::pre_process(context);
}
}
@@ -88,9 +89,10 @@ DuplexPort::pre_process(Context& context)
void
DuplexPort::post_process(Context& context)
{
- // If we're a patch output, we're an input from the internal perspective.
- // Mix down input delivered by plugins so output (external perspective) is ready.
if (_is_output) {
+ /* This is a patch output, which is an input from the internal
+ perspective. Mix down input delivered by plugins so output
+ (external perspective) is ready. */
InputPort::pre_process(context);
if (_broadcast)
@@ -100,4 +102,3 @@ DuplexPort::post_process(Context& context)
} // namespace Server
} // namespace Ingen
-
diff --git a/src/server/InternalPlugin.cpp b/src/server/InternalPlugin.cpp
index c7c0e0a8..f88b696e 100644
--- a/src/server/InternalPlugin.cpp
+++ b/src/server/InternalPlugin.cpp
@@ -32,8 +32,9 @@ namespace Server {
using namespace Internals;
-InternalPlugin::InternalPlugin(Shared::URIs& uris,
- const std::string& uri, const std::string& symbol)
+InternalPlugin::InternalPlugin(Shared::URIs& uris,
+ const std::string& uri,
+ const std::string& symbol)
: PluginImpl(uris, Plugin::Internal, uri)
, _symbol(symbol)
{
diff --git a/src/server/InternalPlugin.hpp b/src/server/InternalPlugin.hpp
index 5b390bf9..79669420 100644
--- a/src/server/InternalPlugin.hpp
+++ b/src/server/InternalPlugin.hpp
@@ -38,8 +38,9 @@ class BufferFactory;
class InternalPlugin : public PluginImpl
{
public:
- InternalPlugin(Shared::URIs& uris,
- const std::string& uri, const std::string& symbol);
+ InternalPlugin(Shared::URIs& uris,
+ const std::string& uri,
+ const std::string& symbol);
NodeImpl* instantiate(BufferFactory& bufs,
const std::string& name,
diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp
index 20bb89da..0c810f73 100644
--- a/src/server/JackDriver.cpp
+++ b/src/server/JackDriver.cpp
@@ -76,13 +76,13 @@ void
JackPort::create()
{
_jack_port = jack_port_register(
- _driver->jack_client(),
- ingen_jack_port_name(_patch_port->path()).c_str(),
- (_patch_port->is_a(PortType::AUDIO))
- ? JACK_DEFAULT_AUDIO_TYPE : JACK_DEFAULT_MIDI_TYPE,
- (_patch_port->is_input())
- ? JackPortIsInput : JackPortIsOutput,
- 0);
+ _driver->jack_client(),
+ ingen_jack_port_name(_patch_port->path()).c_str(),
+ (_patch_port->is_a(PortType::AUDIO))
+ ? JACK_DEFAULT_AUDIO_TYPE : JACK_DEFAULT_MIDI_TYPE,
+ (_patch_port->is_input())
+ ? JackPortIsInput : JackPortIsOutput,
+ 0);
if (_jack_port == NULL) {
LOG(Raul::error)(Raul::fmt("Failed to register port %1%\n")
@@ -203,7 +203,7 @@ JackDriver::attach(const std::string& server_name,
{
assert(!_client);
if (!jack_client) {
- #ifdef INGEN_JACK_SESSION
+#ifdef INGEN_JACK_SESSION
const std::string uuid = _engine.world()->jack_uuid();
if (!uuid.empty()) {
_client = jack_client_open(client_name.c_str(),
@@ -212,15 +212,15 @@ JackDriver::attach(const std::string& server_name,
LOG(Raul::info)(Raul::fmt("Connected to JACK as `%1%' (UUID `%2%')\n")
% client_name.c_str() % uuid);
}
- #endif
+#endif
// Try supplied server name
if (!_client && !server_name.empty()) {
if ((_client = jack_client_open(client_name.c_str(),
- JackServerName, NULL,
+ JackServerName, NULL,
server_name.c_str()))) {
LOG(Raul::info)(Raul::fmt("Connected to JACK server `%1%'\n")
- % server_name);
+ % server_name);
}
}
diff --git a/src/server/LV2Info.cpp b/src/server/LV2Info.cpp
index 2aa68271..5355b11b 100644
--- a/src/server/LV2Info.cpp
+++ b/src/server/LV2Info.cpp
@@ -43,9 +43,9 @@ LV2Info::LV2Info(Ingen::Shared::World* world)
assert(world);
world->lv2_features().add_feature(
- SharedPtr<Shared::LV2Features::Feature>(new ResizeFeature()));
+ SharedPtr<Shared::LV2Features::Feature>(new ResizeFeature()));
world->lv2_features().add_feature(
- SharedPtr<Shared::LV2Features::Feature>(new RequestRunFeature()));
+ SharedPtr<Shared::LV2Features::Feature>(new RequestRunFeature()));
}
LV2Info::~LV2Info()
diff --git a/src/server/LV2Node.cpp b/src/server/LV2Node.cpp
index bde67190..077c94b2 100644
--- a/src/server/LV2Node.cpp
+++ b/src/server/LV2Node.cpp
@@ -50,10 +50,10 @@ namespace Server {
* (It _will_ crash!)
*/
LV2Node::LV2Node(LV2Plugin* plugin,
- const string& name,
- bool polyphonic,
- PatchImpl* parent,
- SampleRate srate)
+ const string& name,
+ bool polyphonic,
+ PatchImpl* parent,
+ SampleRate srate)
: NodeImpl(plugin, name, polyphonic, parent, srate)
, _lv2_plugin(plugin)
, _instances(NULL)
@@ -82,9 +82,9 @@ LV2Node::prepare_poly(BufferFactory& bufs, uint32_t poly)
_prepared_instances = new Instances(poly, *_instances, SharedPtr<void>());
for (uint32_t i = _polyphony; i < _prepared_instances->size(); ++i) {
_prepared_instances->at(i) = SharedPtr<void>(
- lilv_plugin_instantiate(
- _lv2_plugin->lilv_plugin(), _srate, _features->array()),
- lilv_instance_free);
+ lilv_plugin_instantiate(
+ _lv2_plugin->lilv_plugin(), _srate, _features->array()),
+ lilv_instance_free);
if (!_prepared_instances->at(i)) {
Raul::error << "Failed to instantiate plugin" << endl;
@@ -157,8 +157,8 @@ LV2Node::instantiate(BufferFactory& bufs)
for (uint32_t i = 0; i < _polyphony; ++i) {
(*_instances)[i] = SharedPtr<void>(
- lilv_plugin_instantiate(plug, _srate, _features->array()),
- lilv_instance_free);
+ lilv_plugin_instantiate(plug, _srate, _features->array()),
+ lilv_instance_free);
if (!instance(i)) {
Raul::error << "Failed to instantiate plugin " << _lv2_plugin->uri()
@@ -399,8 +399,9 @@ LV2Node::set_port_buffer(uint32_t voice,
SampleCount offset)
{
NodeImpl::set_port_buffer(voice, port_num, buf, offset);
- lilv_instance_connect_port(instance(voice), port_num,
- buf ? buf->port_data(_ports->at(port_num)->type(), offset) : NULL);
+ lilv_instance_connect_port(
+ instance(voice), port_num,
+ buf ? buf->port_data(_ports->at(port_num)->type(), offset) : NULL);
}
} // namespace Server
diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp
index 20f68c17..4998e821 100644
--- a/src/server/LV2Plugin.cpp
+++ b/src/server/LV2Plugin.cpp
@@ -52,7 +52,7 @@ LV2Plugin::symbol() const
size_t last_slash = working.find_last_of("/");
const string symbol = working.substr(last_slash+1);
if ( (symbol[0] >= 'a' && symbol[0] <= 'z')
- || (symbol[0] >= 'A' && symbol[0] <= 'Z') )
+ || (symbol[0] >= 'A' && symbol[0] <= 'Z') )
return Raul::Path::nameify(symbol);
else
working = working.substr(0, last_slash);
diff --git a/src/server/NodeImpl.cpp b/src/server/NodeImpl.cpp
index 5e6b203f..25a51565 100644
--- a/src/server/NodeImpl.cpp
+++ b/src/server/NodeImpl.cpp
@@ -231,7 +231,7 @@ NodeImpl::set_port_buffer(uint32_t voice,
SampleCount offset)
{
/*std::cout << path() << " set port " << port_num << " voice " << voice
- << " buffer " << buf << " offset " << offset << std::endl;*/
+ << " buffer " << buf << " offset " << offset << std::endl;*/
}
} // namespace Server
diff --git a/src/server/ObjectSender.cpp b/src/server/ObjectSender.cpp
index 9ad206dc..e3ab1f5a 100644
--- a/src/server/ObjectSender.cpp
+++ b/src/server/ObjectSender.cpp
@@ -88,7 +88,7 @@ ObjectSender::send_patch(Interface* client,
// Send edges
for (PatchImpl::Edges::const_iterator j = patch->edges().begin();
- j != patch->edges().end(); ++j)
+ j != patch->edges().end(); ++j)
client->connect(j->second->tail_path(), j->second->head_path());
}
diff --git a/src/server/PatchImpl.cpp b/src/server/PatchImpl.cpp
index 9ba7b6cf..89a7a699 100644
--- a/src/server/PatchImpl.cpp
+++ b/src/server/PatchImpl.cpp
@@ -168,7 +168,7 @@ PatchImpl::process(ProcessContext& context)
// Queue any cross-context edges
for (CompiledPatch::QueuedEdges::iterator i = _compiled_patch->queued_edges.begin();
- i != _compiled_patch->queued_edges.end(); ++i) {
+ i != _compiled_patch->queued_edges.end(); ++i) {
(*i)->queue(context);
}
@@ -376,17 +376,19 @@ PatchImpl::remove_port(const string& symbol)
}
}
- if (!found)
- for (Ports::iterator i = _outputs.begin(); i != _outputs.end(); ++i) {
- if ((*i)->symbol() == symbol) {
- ret = _outputs.erase(i);
- found = true;
- break;
+ if (!found) {
+ for (Ports::iterator i = _outputs.begin(); i != _outputs.end(); ++i) {
+ if ((*i)->symbol() == symbol) {
+ ret = _outputs.erase(i);
+ found = true;
+ break;
+ }
}
}
- if ( ! found)
+ if (!found) {
Raul::error << "[PatchImpl::remove_port] Port not found!" << endl;
+ }
return ret;
}
diff --git a/src/server/PatchPlugin.hpp b/src/server/PatchPlugin.hpp
index 863a8371..8f5ca07a 100644
--- a/src/server/PatchPlugin.hpp
+++ b/src/server/PatchPlugin.hpp
@@ -32,11 +32,10 @@ class NodeImpl;
class PatchPlugin : public PluginImpl
{
public:
- PatchPlugin(
- Shared::URIs& uris,
- const std::string& uri,
- const std::string& symbol,
- const std::string& name)
+ PatchPlugin(Shared::URIs& uris,
+ const std::string& uri,
+ const std::string& symbol,
+ const std::string& name)
: PluginImpl(uris, Plugin::Patch, uri)
{}
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp
index 8cb333ba..9f2aae32 100644
--- a/src/server/PortImpl.cpp
+++ b/src/server/PortImpl.cpp
@@ -171,8 +171,8 @@ PortImpl::apply_poly(ProcessContext& context, Raul::Maid& maid, uint32_t poly)
if (is_a(PortType::CONTROL) || is_a(PortType::CV))
for (uint32_t v = 0; v < _poly; ++v)
if (_buffers->at(v))
- boost::static_pointer_cast<AudioBuffer>(_buffers->at(v))->set_value(
- _value.get_float(), 0, 0);
+ boost::static_pointer_cast<AudioBuffer>(
+ _buffers->at(v))->set_value(_value.get_float(), 0, 0);
assert(_buffers->size() >= poly);
assert(this->poly() == poly);
diff --git a/src/server/PostProcessor.cpp b/src/server/PostProcessor.cpp
index 730156cf..cb8566d5 100644
--- a/src/server/PostProcessor.cpp
+++ b/src/server/PostProcessor.cpp
@@ -32,7 +32,7 @@ namespace Ingen {
namespace Server {
PostProcessor::PostProcessor(Engine& engine)
- : _engine(engine)
+ : _engine(engine)
, _max_time(0)
{
}
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp
index edea8f15..8fec67f6 100644
--- a/src/server/events/Connect.cpp
+++ b/src/server/events/Connect.cpp
@@ -85,8 +85,8 @@ Connect::pre_process()
}
if (src_node->parent() != dst_node->parent()
- && src_node != dst_node->parent()
- && src_node->parent() != dst_node) {
+ && src_node != dst_node->parent()
+ && src_node->parent() != dst_node) {
_status = PARENT_DIFFERS;
Event::pre_process();
return;
@@ -98,20 +98,19 @@ Connect::pre_process()
return;
}
- // Edge to a patch port from inside the patch
if (src_node->parent_patch() != dst_node->parent_patch()) {
+ // Edge to a patch port from inside the patch
assert(src_node->parent() == dst_node || dst_node->parent() == src_node);
- if (src_node->parent() == dst_node)
+ if (src_node->parent() == dst_node) {
_patch = dynamic_cast<PatchImpl*>(dst_node);
- else
+ } else {
_patch = dynamic_cast<PatchImpl*>(src_node);
-
- // Edge from a patch input to a patch output (pass through)
+ }
} else if (src_node == dst_node && dynamic_cast<PatchImpl*>(src_node)) {
+ // Edge from a patch input to a patch output (pass through)
_patch = dynamic_cast<PatchImpl*>(src_node);
-
- // Normal edge between nodes with the same parent
} else {
+ // Normal edge between nodes with the same parent
_patch = src_node->parent_patch();
}
diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp
index 9d807503..f5939386 100644
--- a/src/server/events/Connect.hpp
+++ b/src/server/events/Connect.hpp
@@ -24,8 +24,8 @@
#include "types.hpp"
namespace Raul {
- template <typename T> class ListNode;
- template <typename T> class Array;
+template <typename T> class ListNode;
+template <typename T> class Array;
}
namespace Ingen {
diff --git a/src/server/events/CreateNode.cpp b/src/server/events/CreateNode.cpp
index 414003d8..b2a6a995 100644
--- a/src/server/events/CreateNode.cpp
+++ b/src/server/events/CreateNode.cpp
@@ -54,9 +54,9 @@ CreateNode::CreateNode(Engine& engine,
, _properties(properties)
{
const Resource::Properties::const_iterator p = properties.find(
- engine.world()->uris().ingen_polyphonic);
+ engine.world()->uris().ingen_polyphonic);
if (p != properties.end() && p->second.type() == engine.world()->forge().Bool
- && p->second.get_bool())
+ && p->second.get_bool())
_polyphonic = true;
}
diff --git a/src/server/events/CreatePatch.cpp b/src/server/events/CreatePatch.cpp
index 465dbe86..68359a5b 100644
--- a/src/server/events/CreatePatch.cpp
+++ b/src/server/events/CreatePatch.cpp
@@ -79,7 +79,7 @@ CreatePatch::pre_process()
const Ingen::Shared::URIs& uris = _engine.world()->uris();
_patch = new PatchImpl(_engine, path.symbol(), poly, _parent,
- _engine.driver()->sample_rate(), _poly);
+ _engine.driver()->sample_rate(), _poly);
_patch->properties().insert(_properties.begin(), _properties.end());
_patch->add_property(uris.rdf_type, uris.ingen_Patch);
_patch->add_property(uris.rdf_type,
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index 1cb172d2..c4ba0a3b 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -114,15 +114,16 @@ CreatePort::pre_process()
std::make_pair(uris.lv2_index,
_engine.world()->forge().make(int32_t(old_num_ports))));
} else if (index_i->second.type() != uris.forge.Int
- || index_i->second.get_int32() != static_cast<int32_t>(old_num_ports)) {
+ || index_i->second.get_int32() != static_cast<int32_t>(old_num_ports)) {
Event::pre_process();
_status = BAD_INDEX;
return;
}
Resource::Properties::const_iterator poly_i = _properties.find(uris.ingen_polyphonic);
- bool polyphonic = (poly_i != _properties.end() && poly_i->second.type() == uris.forge.Bool
- && poly_i->second.get_bool());
+ bool polyphonic = (poly_i != _properties.end() &&
+ poly_i->second.type() == uris.forge.Bool &&
+ poly_i->second.get_bool());
_patch_port = _patch->create_port(*_engine.buffer_factory(), _path.symbol(),
_port_type, _buffer_type, buffer_size,
@@ -149,7 +150,7 @@ CreatePort::pre_process()
if (!_patch->parent()) {
_engine_port = _engine.driver()->create_port(
- dynamic_cast<DuplexPort*>(_patch_port));
+ dynamic_cast<DuplexPort*>(_patch_port));
}
assert(_ports_array->size() == _patch->num_ports_non_rt());
diff --git a/src/server/events/Delete.hpp b/src/server/events/Delete.hpp
index ff4a4e07..2ca24469 100644
--- a/src/server/events/Delete.hpp
+++ b/src/server/events/Delete.hpp
@@ -23,8 +23,8 @@
#include "ControlBindings.hpp"
namespace Raul {
- template<typename T> class Array;
- template<typename T> class ListNode;
+template<typename T> class Array;
+template<typename T> class ListNode;
}
namespace Ingen {
diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp
index 8f955311..fa17e9f4 100644
--- a/src/server/events/Disconnect.hpp
+++ b/src/server/events/Disconnect.hpp
@@ -24,8 +24,8 @@
#include "BufferFactory.hpp"
namespace Raul {
- template <typename T> class ListNode;
- template <typename T> class Array;
+template <typename T> class ListNode;
+template <typename T> class Array;
}
namespace Ingen {
diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp
index 2451c65e..3874fcf1 100644
--- a/src/server/events/Move.cpp
+++ b/src/server/events/Move.cpp
@@ -73,7 +73,7 @@ Move::pre_process()
}
SharedPtr< Raul::Table< Raul::Path, SharedPtr<GraphObject> > > removed
- = _engine.engine_store()->remove(_store_iterator);
+ = _engine.engine_store()->remove(_store_iterator);
assert(removed->size() > 0);
diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp
index 1a12dcd4..df89dc2d 100644
--- a/src/server/events/SetPortValue.cpp
+++ b/src/server/events/SetPortValue.cpp
@@ -139,7 +139,7 @@ SetPortValue::apply(Context& context)
for (uint32_t v = 0; v < _port->poly(); ++v) {
((AudioBuffer*)_port->buffer(v).get())->set_value(
- _value.get_float(), start, _time);
+ _value.get_float(), start, _time);
}
return;
}
diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp
index 1e6cc594..41b56a77 100644
--- a/src/server/internals/Controller.cpp
+++ b/src/server/internals/Controller.cpp
@@ -119,7 +119,7 @@ ControllerNode::control(ProcessContext& context, uint8_t control_num, uint8_t va
// FIXME: not thread safe
_param_port->set_value(context.engine().world()->forge().make(control_num));
((AudioBuffer*)_param_port->buffer(0).get())->set_value(
- (float)control_num, context.start(), context.end());
+ (float)control_num, context.start(), context.end());
_param_port->broadcast_value(context, true);
_learning = false;
}
diff --git a/src/server/internals/Controller.hpp b/src/server/internals/Controller.hpp
index de87876e..5672d8ab 100644
--- a/src/server/internals/Controller.hpp
+++ b/src/server/internals/Controller.hpp
@@ -39,13 +39,12 @@ namespace Internals {
class ControllerNode : public NodeImpl
{
public:
- ControllerNode(
- InternalPlugin* plugin,
- BufferFactory& bufs,
- const std::string& path,
- bool polyphonic,
- PatchImpl* parent,
- SampleRate srate);
+ ControllerNode(InternalPlugin* plugin,
+ BufferFactory& bufs,
+ const std::string& path,
+ bool polyphonic,
+ PatchImpl* parent,
+ SampleRate srate);
void process(ProcessContext& context);
diff --git a/src/server/internals/Delay.cpp b/src/server/internals/Delay.cpp
index fa0cb897..f825ffa5 100644
--- a/src/server/internals/Delay.cpp
+++ b/src/server/internals/Delay.cpp
@@ -38,7 +38,7 @@
#define LOG(s) s << "[DelayNode] "
#define CALC_DELAY(delaytime) \
- (f_clamp (delaytime * (float)sample_rate, 1.0f, (float)(buffer_mask + 1)))
+ (f_clamp (delaytime * (float)sample_rate, 1.0f, (float)(buffer_mask + 1)))
using namespace std;
@@ -52,13 +52,12 @@ InternalPlugin* DelayNode::internal_plugin(Shared::URIs& uris) {
return new InternalPlugin(uris, NS_INTERNALS "Delay", "delay");
}
-DelayNode::DelayNode(
- InternalPlugin* plugin,
- BufferFactory& bufs,
- const std::string& path,
- bool polyphonic,
- PatchImpl* parent,
- SampleRate srate)
+DelayNode::DelayNode(InternalPlugin* plugin,
+ BufferFactory& bufs,
+ const std::string& path,
+ bool polyphonic,
+ PatchImpl* parent,
+ SampleRate srate)
: NodeImpl(plugin, path, polyphonic, parent, srate)
, _buffer(0)
, _buffer_length(0)
@@ -134,9 +133,10 @@ static inline float f_clamp(float x, float a, float b)
static inline float cube_interp(const float fr, const float inm1, const float
in, const float inp1, const float inp2)
{
- return in + 0.5f * fr * (inp1 - inm1 +
- fr * (4.0f * inp1 + 2.0f * inm1 - 5.0f * in - inp2 +
- fr * (3.0f * (in - inp1) - inm1 + inp2)));
+ return in + 0.5f * fr * (
+ inp1 - inm1 + fr * (
+ 4.0f * inp1 + 2.0f * inm1 - 5.0f * in - inp2 + fr * (
+ 3.0f * (in - inp1) - inm1 + inp2)));
}
void
@@ -171,10 +171,10 @@ DelayNode::process(ProcessContext& context)
for (uint32_t i = 0; i < sample_count; i++) {
int64_t read_phase = write_phase - (int64_t)delay_samples;
const float read = cube_interp(frac,
- buffer_at(read_phase - 1),
- buffer_at(read_phase),
- buffer_at(read_phase + 1),
- buffer_at(read_phase + 2));
+ buffer_at(read_phase - 1),
+ buffer_at(read_phase),
+ buffer_at(read_phase + 1),
+ buffer_at(read_phase + 2));
buffer_at(write_phase++) = in[i];
out[i] = read;
}
@@ -189,10 +189,10 @@ DelayNode::process(ProcessContext& context)
const int64_t idelay_samples = (int64_t)delay_samples;
const float frac = delay_samples - idelay_samples;
const float read = cube_interp(frac,
- buffer_at(read_phase - 1),
- buffer_at(read_phase),
- buffer_at(read_phase + 1),
- buffer_at(read_phase + 2));
+ buffer_at(read_phase - 1),
+ buffer_at(read_phase),
+ buffer_at(read_phase + 1),
+ buffer_at(read_phase + 2));
buffer_at(write_phase) = in[i];
out[i] = read;
}
diff --git a/src/server/internals/Delay.hpp b/src/server/internals/Delay.hpp
index 4cca4ed7..e9695ecc 100644
--- a/src/server/internals/Delay.hpp
+++ b/src/server/internals/Delay.hpp
@@ -35,13 +35,12 @@ namespace Internals {
class DelayNode : public NodeImpl
{
public:
- DelayNode(
- InternalPlugin* plugin,
- BufferFactory& bufs,
- const std::string& path,
- bool polyphonic,
- PatchImpl* parent,
- SampleRate srate);
+ DelayNode(InternalPlugin* plugin,
+ BufferFactory& bufs,
+ const std::string& path,
+ bool polyphonic,
+ PatchImpl* parent,
+ SampleRate srate);
~DelayNode();
diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp
index e131fb69..e603c711 100644
--- a/src/server/internals/Note.cpp
+++ b/src/server/internals/Note.cpp
@@ -47,13 +47,12 @@ InternalPlugin* NoteNode::internal_plugin(Shared::URIs& uris) {
return new InternalPlugin(uris, NS_INTERNALS "Note", "note");
}
-NoteNode::NoteNode(
- InternalPlugin* plugin,
- BufferFactory& bufs,
- const std::string& path,
- bool polyphonic,
- PatchImpl* parent,
- SampleRate srate)
+NoteNode::NoteNode(InternalPlugin* plugin,
+ BufferFactory& bufs,
+ const std::string& path,
+ bool polyphonic,
+ PatchImpl* parent,
+ SampleRate srate)
: NodeImpl(plugin, path, polyphonic, parent, srate)
, _voices(new Raul::Array<Voice>(_polyphony))
, _prepared_voices(NULL)
@@ -232,7 +231,7 @@ NoteNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity, F
#ifdef RAUL_LOG_DEBUG
LOG(debug) << "Note " << (int)note_num << " on @ " << time
- << ". Voice " << voice_num << " / " << _polyphony << endl;
+ << ". Voice " << voice_num << " / " << _polyphony << endl;
#endif
// Update stolen key, if applicable
@@ -259,17 +258,17 @@ NoteNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity, F
assert(_keys[voice->note].voice == voice_num);
((AudioBuffer*)_freq_port->buffer(voice_num).get())->set_value(
- note_to_freq(note_num), context.start(), time);
+ note_to_freq(note_num), context.start(), time);
((AudioBuffer*)_vel_port->buffer(voice_num).get())->set_value(
- velocity/127.0, context.start(), time);
+ velocity/127.0, context.start(), time);
((AudioBuffer*)_gate_port->buffer(voice_num).get())->set_value(
- 1.0f, context.start(), time);
+ 1.0f, context.start(), time);
// trigger (one sample)
((AudioBuffer*)_trig_port->buffer(voice_num).get())->set_value(
- 1.0f, context.start(), time);
+ 1.0f, context.start(), time);
((AudioBuffer*)_trig_port->buffer(voice_num).get())->set_value(
- 0.0f, context.start(), time + 1);
+ 0.0f, context.start(), time + 1);
assert(key->state == Key::Key::ON_ASSIGNED);
assert(voice->state == Voice::Voice::ACTIVE);
diff --git a/src/server/internals/Note.hpp b/src/server/internals/Note.hpp
index 22aaee7d..591214ce 100644
--- a/src/server/internals/Note.hpp
+++ b/src/server/internals/Note.hpp
@@ -39,13 +39,12 @@ namespace Internals {
class NoteNode : public NodeImpl
{
public:
- NoteNode(
- InternalPlugin* plugin,
- BufferFactory& bufs,
- const std::string& path,
- bool polyphonic,
- PatchImpl* parent,
- SampleRate srate);
+ NoteNode(InternalPlugin* plugin,
+ BufferFactory& bufs,
+ const std::string& path,
+ bool polyphonic,
+ PatchImpl* parent,
+ SampleRate srate);
~NoteNode();
diff --git a/src/server/internals/Trigger.cpp b/src/server/internals/Trigger.cpp
index ae06d3b6..3c33f958 100644
--- a/src/server/internals/Trigger.cpp
+++ b/src/server/internals/Trigger.cpp
@@ -43,13 +43,12 @@ InternalPlugin* TriggerNode::internal_plugin(Shared::URIs& uris) {
return new InternalPlugin(uris, NS_INTERNALS "Trigger", "trigger");
}
-TriggerNode::TriggerNode(
- InternalPlugin* plugin,
- BufferFactory& bufs,
- const std::string& path,
- bool polyphonic,
- PatchImpl* parent,
- SampleRate srate)
+TriggerNode::TriggerNode(InternalPlugin* plugin,
+ BufferFactory& bufs,
+ const std::string& path,
+ bool polyphonic,
+ PatchImpl* parent,
+ SampleRate srate)
: NodeImpl(plugin, path, false, parent, srate)
, _learning(false)
{
@@ -136,7 +135,7 @@ TriggerNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity
// FIXME
//_note_port->set_value(note_num);
((AudioBuffer*)_note_port->buffer(0).get())->set_value(
- (float)note_num, context.start(), context.end());
+ (float)note_num, context.start(), context.end());
_note_port->broadcast_value(context, true);
_learning = false;
}
diff --git a/src/server/internals/Trigger.hpp b/src/server/internals/Trigger.hpp
index 0c1f779b..5bbae82d 100644
--- a/src/server/internals/Trigger.hpp
+++ b/src/server/internals/Trigger.hpp
@@ -42,13 +42,12 @@ namespace Internals {
class TriggerNode : public NodeImpl
{
public:
- TriggerNode(
- InternalPlugin* plugin,
- BufferFactory& bufs,
- const std::string& path,
- bool polyphonic,
- PatchImpl* parent,
- SampleRate srate);
+ TriggerNode(InternalPlugin* plugin,
+ BufferFactory& bufs,
+ const std::string& path,
+ bool polyphonic,
+ PatchImpl* parent,
+ SampleRate srate);
void process(ProcessContext& context);
diff --git a/src/server/util.hpp b/src/server/util.hpp
index 372ae084..249b7a1e 100644
--- a/src/server/util.hpp
+++ b/src/server/util.hpp
@@ -70,7 +70,7 @@ set_denormal_flags()
}
} else {
Raul::warn << "This code has been built with SSE support, but your processor does"
- << " not support the SSE instruction set, exiting." << std::endl;
+ << " not support the SSE instruction set, exiting." << std::endl;
exit(EXIT_FAILURE);
}
#endif