From c7c29dfbbd6b237aada410ed36d5dcaaed8efbc8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 18 Sep 2007 00:59:38 +0000 Subject: Fix MIDI buffer reading error, fixes reading of multiple MIDI events per cycle (including stuck notes, fixes ticket 86). git-svn-id: http://svn.drobilla.net/lad/ingen@717 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/Patch.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/libs/engine/Patch.cpp') diff --git a/src/libs/engine/Patch.cpp b/src/libs/engine/Patch.cpp index 8e0b8862..78184a82 100644 --- a/src/libs/engine/Patch.cpp +++ b/src/libs/engine/Patch.cpp @@ -120,7 +120,7 @@ Patch::process(SampleCount nframes, FrameTime start, FrameTime end) /* Prepare input ports */ - // This breaks MIDI input, somehow (?) + // FIXME: This breaks MIDI input, somehow? OK disabled? //for (Raul::List::iterator i = _input_ports.begin(); i != _input_ports.end(); ++i) // (*i)->pre_process(nframes, start, end); for (Raul::List::iterator i = _output_ports.begin(); i != _output_ports.end(); ++i) @@ -171,7 +171,6 @@ Patch::process_parallel(SampleCount nframes, FrameTime start, FrameTime end) */ size_t index = 0; - //size_t run_count = 0; size_t num_finished = 0; // Number of consecutive finished nodes hit while (num_finished < cp->size()) { @@ -180,16 +179,12 @@ Patch::process_parallel(SampleCount nframes, FrameTime start, FrameTime end) if (n.node()->process_lock()) { if (n.node()->n_inputs_ready() == n.n_providers()) { - //cout << "************ Main running " << n.node()->path() << " at index " << index << endl; n.node()->process(nframes, start, end); - //cerr << n.node()->path() << " @ " << &n << " dependants: " << n.dependants().size() << endl; - /* Signal dependants their input is ready */ for (size_t i=0; i < n.dependants().size(); ++i) n.dependants()[i]->signal_input_ready(); - //++run_count; ++num_finished; } else { n.node()->process_unlock(); @@ -205,8 +200,6 @@ Patch::process_parallel(SampleCount nframes, FrameTime start, FrameTime end) index = (index + 1) % cp->size(); } - //cout << "Main Thread ran \t" << run_count << " nodes this cycle." << endl; - /* Tell slaves we're done in case we beat them, and pray they're * really done by the start of next cycle. * FIXME: This probably breaks (race) at extremely small nframes. -- cgit v1.2.1