From 50f5747f3877d124014ce6eaba307a6bffddc1c2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Apr 2012 04:58:37 +0000 Subject: Tidy. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4300 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/ConnectionImpl.cpp | 49 +++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 23 deletions(-) (limited to 'src/server/ConnectionImpl.cpp') 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* srcs, uint32_t max_num_srcs, uint32_t& num_srcs) +ConnectionImpl::get_sources(Context& context, + uint32_t voice, + boost::intrusive_ptr* 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 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 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 -- cgit v1.2.1