summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-06-02 22:55:11 +0000
committerDavid Robillard <d@drobilla.net>2009-06-02 22:55:11 +0000
commita9f1f6912fa3e6b485a5c6e4195233ef3fb087a1 (patch)
treeca66aa1f973d127127c3a72ed1e4a98b53116e9b /src/engine
parent9cc7a1adb60ad24da0926f15af13f2a7acd0c2e3 (diff)
downloadingen-a9f1f6912fa3e6b485a5c6e4195233ef3fb087a1.tar.gz
ingen-a9f1f6912fa3e6b485a5c6e4195233ef3fb087a1.tar.bz2
ingen-a9f1f6912fa3e6b485a5c6e4195233ef3fb087a1.zip
Remove redundant EventBuffer::_iter.
Fix EventBuffer unjoining. Don't pre-process patch input port connections twice. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2060 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/DuplexPort.cpp3
-rw-r--r--src/engine/EventBuffer.cpp11
-rw-r--r--src/engine/EventBuffer.hpp7
-rw-r--r--src/engine/LV2EventBuffer.hpp4
4 files changed, 7 insertions, 18 deletions
diff --git a/src/engine/DuplexPort.cpp b/src/engine/DuplexPort.cpp
index 1f26d4e3..195d0468 100644
--- a/src/engine/DuplexPort.cpp
+++ b/src/engine/DuplexPort.cpp
@@ -62,9 +62,6 @@ DuplexPort::pre_process(ProcessContext& context)
cerr << path() << " duplex pre: buffer: " << buffer(0) << endl;
cerr << path() << " duplex pre: is_output: " << _is_output << " { " << endl;*/
- for (Connections::iterator c = _connections.begin(); c != _connections.end(); ++c)
- (*c)->process(context);
-
if (_is_output) {
for (uint32_t i=0; i < _poly; ++i)
diff --git a/src/engine/EventBuffer.cpp b/src/engine/EventBuffer.cpp
index f8e3a5de..7110ccc2 100644
--- a/src/engine/EventBuffer.cpp
+++ b/src/engine/EventBuffer.cpp
@@ -51,16 +51,10 @@ bool
EventBuffer::join(Buffer* buf)
{
EventBuffer* ebuf = dynamic_cast<EventBuffer*>(buf);
- if (ebuf) {
- _buf = ebuf->_local_buf;
- _joined_buf = ebuf;
- _iter = ebuf->_iter;
- _iter.buf = _buf->data();
+ if (!ebuf)
return false;
- } else {
- return false;
- }
+ _buf = ebuf->_local_buf;
_joined_buf = ebuf;
return true;
@@ -72,7 +66,6 @@ EventBuffer::unjoin()
{
_joined_buf = NULL;
_buf = _local_buf;
- reset(_this_nframes);
}
diff --git a/src/engine/EventBuffer.hpp b/src/engine/EventBuffer.hpp
index 5a4be3ac..5f33f2de 100644
--- a/src/engine/EventBuffer.hpp
+++ b/src/engine/EventBuffer.hpp
@@ -82,10 +82,9 @@ public:
}
private:
- LV2EventBuffer* _buf; ///< Contents (maybe belong to _joined_buf)
- LV2EventBuffer* _local_buf; ///< Local contents
- mutable LV2_Event_Iterator _iter; ///< Iterator into _buf
- uint32_t _this_nframes; ///< Current cycle nframes
+ LV2EventBuffer* _buf; ///< Contents (maybe belong to _joined_buf)
+ LV2EventBuffer* _local_buf; ///< Local contents
+ uint32_t _this_nframes; ///< Current cycle nframes
};
diff --git a/src/engine/LV2EventBuffer.hpp b/src/engine/LV2EventBuffer.hpp
index 9d802a62..68633a8f 100644
--- a/src/engine/LV2EventBuffer.hpp
+++ b/src/engine/LV2EventBuffer.hpp
@@ -29,8 +29,8 @@ public:
LV2EventBuffer(size_t capacity);
~LV2EventBuffer();
- inline LV2_Event_Buffer* data() { return _data; }
- inline const LV2_Event_Buffer* data() const { return _data; }
+ /*inline LV2_Event_Buffer* data() { return _data; }
+ inline const LV2_Event_Buffer* data() const { return _data; }*/
inline void rewind() const { lv2_event_begin(&_iter, _data); }