summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/ConnectionImpl.cpp49
-rw-r--r--src/server/ConnectionImpl.hpp4
-rw-r--r--src/server/EventSource.hpp2
-rw-r--r--src/server/LV2ResizeFeature.hpp6
-rw-r--r--src/server/ObjectSender.cpp5
5 files changed, 36 insertions, 30 deletions
diff --git a/src/server/ConnectionImpl.cpp b/src/server/ConnectionImpl.cpp
index d233ab5d..1fde56b4 100644
--- a/src/server/ConnectionImpl.cpp
+++ b/src/server/ConnectionImpl.cpp
@@ -81,14 +81,17 @@ ConnectionImpl::head_path() const
}
void
-ConnectionImpl::get_sources(Context& context, uint32_t voice,
- boost::intrusive_ptr<Buffer>* srcs, uint32_t max_num_srcs, uint32_t& num_srcs)
+ConnectionImpl::get_sources(Context& context,
+ uint32_t voice,
+ boost::intrusive_ptr<Buffer>* srcs,
+ uint32_t max_num_srcs,
+ uint32_t& num_srcs)
{
if (must_queue() && _queue->read_space() > 0) {
LV2_Atom obj;
_queue->peek(sizeof(LV2_Atom), &obj);
- boost::intrusive_ptr<Buffer> buf = context.engine().buffer_factory()->get(
- head()->buffer_type(), sizeof(LV2_Atom) + obj.size);
+ BufferRef buf = context.engine().buffer_factory()->get(
+ head()->buffer_type(), sizeof(LV2_Atom) + obj.size);
void* data = buf->port_data(PortType::ATOM, context.offset());
_queue->read(sizeof(LV2_Atom) + obj.size, (LV2_Atom*)data);
srcs[num_srcs++] = buf;
@@ -116,7 +119,7 @@ ConnectionImpl::queue(Context& context)
boost::intrusive_ptr<Buffer> src_buf = _tail->buffer(0);
if (src_buf->atom()->type != uris.atom_Sequence) {
- Raul::error << "Queued connection but source is not a Sequence" << std::endl;
+ Raul::error << "Queued edge source is not a Sequence" << std::endl;
return;
}
@@ -160,29 +163,29 @@ ConnectionImpl::can_connect(const OutputPort* src, const InputPort* dst)
{
const Ingen::Shared::URIs& uris = src->bufs().uris();
return (
- // (Audio | Control | CV) => (Audio | Control | CV)
- ( (src->is_a(PortType::CONTROL) ||
- src->is_a(PortType::AUDIO) ||
- src->is_a(PortType::CV))
- && (dst->is_a(PortType::CONTROL)
- || dst->is_a(PortType::AUDIO)
- || dst->is_a(PortType::CV)))
+ // (Audio | Control | CV) => (Audio | Control | CV)
+ ( (src->is_a(PortType::CONTROL) ||
+ src->is_a(PortType::AUDIO) ||
+ src->is_a(PortType::CV))
+ && (dst->is_a(PortType::CONTROL)
+ || dst->is_a(PortType::AUDIO)
+ || dst->is_a(PortType::CV)))
- // Equal types
- || (src->type() == dst->type() &&
- src->buffer_type() == dst->buffer_type())
+ // Equal types
+ || (src->type() == dst->type() &&
+ src->buffer_type() == dst->buffer_type())
- // Control => atom:Float Value
- || (src->is_a(PortType::CONTROL) && dst->supports(uris.atom_Float))
+ // Control => atom:Float Value
+ || (src->is_a(PortType::CONTROL) && dst->supports(uris.atom_Float))
- // Audio => atom:Sound Value
- || (src->is_a(PortType::AUDIO) && dst->supports(uris.atom_Sound))
+ // Audio => atom:Sound Value
+ || (src->is_a(PortType::AUDIO) && dst->supports(uris.atom_Sound))
- // atom:Float Value => Control
- || (src->supports(uris.atom_Float) && dst->is_a(PortType::CONTROL))
+ // atom:Float Value => Control
+ || (src->supports(uris.atom_Float) && dst->is_a(PortType::CONTROL))
- // atom:Sound Value => Audio
- || (src->supports(uris.atom_Sound) && dst->is_a(PortType::AUDIO)));
+ // atom:Sound Value => Audio
+ || (src->supports(uris.atom_Sound) && dst->is_a(PortType::AUDIO)));
}
} // namespace Server
diff --git a/src/server/ConnectionImpl.hpp b/src/server/ConnectionImpl.hpp
index a93674b6..395e749d 100644
--- a/src/server/ConnectionImpl.hpp
+++ b/src/server/ConnectionImpl.hpp
@@ -83,10 +83,10 @@ public:
*/
BufferRef buffer(uint32_t voice) const;
- /** Returns true if this connection must mix down voices into a local buffer */
+ /** Whether this connection must mix down voices into a local buffer */
bool must_mix() const;
- /** Returns true if this connection crosses contexts and must buffer */
+ /** Whether this connection crosses contexts and must buffer */
bool must_queue() const;
static bool can_connect(const OutputPort* src, const InputPort* dst);
diff --git a/src/server/EventSource.hpp b/src/server/EventSource.hpp
index ebe3dd70..e8619786 100644
--- a/src/server/EventSource.hpp
+++ b/src/server/EventSource.hpp
@@ -42,7 +42,7 @@ public:
void process(PostProcessor& dest, ProcessContext& context, bool limit=true);
- inline bool unprepared_events() const { return (_prepared_back.get() != NULL); }
+ inline bool unprepared_events() const { return _prepared_back.get(); }
inline bool empty() const { return !_head.get(); }
protected:
diff --git a/src/server/LV2ResizeFeature.hpp b/src/server/LV2ResizeFeature.hpp
index 915c7442..a2d9e8b6 100644
--- a/src/server/LV2ResizeFeature.hpp
+++ b/src/server/LV2ResizeFeature.hpp
@@ -29,8 +29,8 @@ namespace Server {
struct ResizeFeature : public Ingen::Shared::LV2Features::Feature {
static LV2_Resize_Port_Status resize_port(
LV2_Resize_Port_Feature_Data data,
- uint32_t index,
- size_t size) {
+ uint32_t index,
+ size_t size) {
NodeImpl* node = (NodeImpl*)data;
PortImpl* port = node->port_impl(index);
if (node->context() == Context::MESSAGE) {
@@ -51,7 +51,7 @@ struct ResizeFeature : public Ingen::Shared::LV2Features::Feature {
if (!node)
return SharedPtr<LV2_Feature>();
LV2_Resize_Port_Resize* data
- = (LV2_Resize_Port_Resize*)malloc(sizeof(LV2_Resize_Port_Resize));
+ = (LV2_Resize_Port_Resize*)malloc(sizeof(LV2_Resize_Port_Resize));
data->data = node;
data->resize = &resize_port;
LV2_Feature* f = (LV2_Feature*)malloc(sizeof(LV2_Feature));
diff --git a/src/server/ObjectSender.cpp b/src/server/ObjectSender.cpp
index 4115f2e3..85be4efd 100644
--- a/src/server/ObjectSender.cpp
+++ b/src/server/ObjectSender.cpp
@@ -58,7 +58,10 @@ ObjectSender::send_object(Interface* client,
}
void
-ObjectSender::send_patch(Interface* client, const PatchImpl* patch, bool recursive, bool bundle)
+ObjectSender::send_patch(Interface* client,
+ const PatchImpl* patch,
+ bool recursive,
+ bool bundle)
{
if (bundle)
client->bundle_begin();