From ccc455f6fccc4a15bfe127388b7f548f82d84f55 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 20 Feb 2009 23:45:57 +0000 Subject: Fix crash when connecting ports with mismatched poly where the destination port has fixed buffers (fix ticket #333). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1936 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/ConnectionImpl.cpp | 6 +++--- src/engine/ConnectionImpl.hpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/engine') diff --git a/src/engine/ConnectionImpl.cpp b/src/engine/ConnectionImpl.cpp index 60944d6c..b9d5e2af 100644 --- a/src/engine/ConnectionImpl.cpp +++ b/src/engine/ConnectionImpl.cpp @@ -71,10 +71,10 @@ ConnectionImpl::~ConnectionImpl() void ConnectionImpl::set_mode() { - if (must_copy()) - _mode = COPY; - else if (must_mix()) + if (must_mix()) _mode = MIX; + else if (must_copy()) + _mode = COPY; else if (must_extend()) _mode = EXTEND; diff --git a/src/engine/ConnectionImpl.hpp b/src/engine/ConnectionImpl.hpp index e3bad1e1..3b357906 100644 --- a/src/engine/ConnectionImpl.hpp +++ b/src/engine/ConnectionImpl.hpp @@ -72,10 +72,6 @@ public: void prepare_poly(uint32_t poly); void apply_poly(Raul::Maid& maid, uint32_t poly); - bool must_copy() const; - bool must_mix() const; - bool must_extend() const; - inline bool need_buffer() const { return must_mix(); } inline bool can_direct() const { return _mode == DIRECT; } @@ -84,6 +80,10 @@ public: protected: enum { DIRECT, MIX, COPY, EXTEND } _mode; void set_mode(); + + bool must_copy() const; + bool must_mix() const; + bool must_extend() const; PortImpl* const _src_port; PortImpl* const _dst_port; -- cgit v1.2.1