summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-02-20 23:45:57 +0000
committerDavid Robillard <d@drobilla.net>2009-02-20 23:45:57 +0000
commitccc455f6fccc4a15bfe127388b7f548f82d84f55 (patch)
tree3028bf44b6b1b968e9f317710c85877b45adca09 /src/engine
parent12e74d4a26eede059f016cc8a7806a57d5c9338e (diff)
downloadingen-ccc455f6fccc4a15bfe127388b7f548f82d84f55.tar.gz
ingen-ccc455f6fccc4a15bfe127388b7f548f82d84f55.tar.bz2
ingen-ccc455f6fccc4a15bfe127388b7f548f82d84f55.zip
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
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/ConnectionImpl.cpp6
-rw-r--r--src/engine/ConnectionImpl.hpp8
2 files changed, 7 insertions, 7 deletions
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;