summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/DuplexPort.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-05-20 05:21:43 +0000
committerDavid Robillard <d@drobilla.net>2008-05-20 05:21:43 +0000
commit34093b89423e7d195972e68676c73853228d35f6 (patch)
treeefaad4b4a3dd095f52cc90fd2af7db6c0dc33c40 /src/libs/engine/DuplexPort.cpp
parent240f6f0c4e6f5d2770fd166f162df41906e2e230 (diff)
downloadingen-34093b89423e7d195972e68676c73853228d35f6.tar.gz
ingen-34093b89423e7d195972e68676c73853228d35f6.tar.bz2
ingen-34093b89423e7d195972e68676c73853228d35f6.zip
Fix direct midi in -> midi out connections in root patch with plugins present.
Fix Jack MIDI output. Attempted fixes for LV2 UI MIDI event writing, but.. still not working? git-svn-id: http://svn.drobilla.net/lad/ingen@1223 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/DuplexPort.cpp')
-rw-r--r--src/libs/engine/DuplexPort.cpp36
1 files changed, 26 insertions, 10 deletions
diff --git a/src/libs/engine/DuplexPort.cpp b/src/libs/engine/DuplexPort.cpp
index 7fde9d0d..71a65e4f 100644
--- a/src/libs/engine/DuplexPort.cpp
+++ b/src/libs/engine/DuplexPort.cpp
@@ -24,6 +24,7 @@
#include "OutputPort.hpp"
#include "NodeImpl.hpp"
#include "ProcessContext.hpp"
+#include "EventBuffer.hpp"
using namespace std;
@@ -45,14 +46,22 @@ DuplexPort::pre_process(ProcessContext& context)
{
// <BrainHurt>
- /*cerr << path() << " duplex pre: fixed buffers: " << fixed_buffers() << endl;
+ /*cerr << endl << "{ duplex pre" << endl;
+ cerr << path() << " duplex pre: fixed buffers: " << fixed_buffers() << endl;
cerr << path() << " duplex pre: buffer: " << buffer(0) << endl;
cerr << path() << " duplex pre: is_output: " << _is_output << " { " << endl;*/
+ /*if (type() == DataType::EVENT)
+ for (uint32_t i=0; i < _poly; ++i)
+ cerr << path() << " (" << buffer(i) << ") # events: "
+ << ((EventBuffer*)buffer(i))->event_count()
+ << ", joined: " << _buffers->at(i)->is_joined() << endl;*/
+
if (_is_output) {
for (uint32_t i=0; i < _poly; ++i)
- _buffers->at(i)->prepare_write(context.nframes());
+ if (!_buffers->at(i)->is_joined())
+ _buffers->at(i)->prepare_write(context.nframes());
} else {
@@ -62,7 +71,7 @@ DuplexPort::pre_process(ProcessContext& context)
broadcast(context);
}
- //cerr << "} pre " << path() << endl;
+ //cerr << "} duplex pre " << path() << endl;
// </BrainHurt>
}
@@ -71,20 +80,27 @@ DuplexPort::pre_process(ProcessContext& context)
void
DuplexPort::post_process(ProcessContext& context)
{
- /*cerr << path() << " duplex post: fixed buffers: " << fixed_buffers() << endl;
+ // <BrainHurt>
+
+ /*cerr << endl << "{ duplex post" << endl;
+ cerr << path() << " duplex post: fixed buffers: " << fixed_buffers() << endl;
cerr << path() << " duplex post: buffer: " << buffer(0) << endl;
- cerr << path() << " duplex post: is_output: " << _is_output << " { " << endl;*/
+ cerr << path() << " duplex post: is_output: " << _is_output << " { " << endl;
- // <BrainHurt>
+ if (type() == DataType::EVENT)
+ for (uint32_t i=0; i < _poly; ++i)
+ cerr << path() << " (" << buffer(i) << ") # events: "
+ << ((EventBuffer*)buffer(i))->event_count()
+ << ", joined: " << _buffers->at(i)->is_joined() << endl;*/
+
if (_is_output) {
InputPort::pre_process(context); // Mix down inputs
broadcast(context);
}
-
- OutputPort::pre_process(context);
- // </BrainHurt>
- //cerr << "} post " << path() << endl;
+ //cerr << "} duplex post " << path() << endl;
+
+ // </BrainHurt>
}