summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/midi_ui.cc2
-rw-r--r--libs/midi++2/jack_midi_port.cc6
-rw-r--r--libs/midi++2/midi++/jack_midi_port.h10
-rw-r--r--libs/midi++2/midi++/port.h2
4 files changed, 19 insertions, 1 deletions
diff --git a/libs/ardour/midi_ui.cc b/libs/ardour/midi_ui.cc
index 78da32e427..82261b58ec 100644
--- a/libs/ardour/midi_ui.cc
+++ b/libs/ardour/midi_ui.cc
@@ -104,7 +104,9 @@ MidiControlUI::midi_input_handler (IOCondition ioc, MIDI::Port* port)
if (ioc & IO_IN) {
+#ifndef WIN32
CrossThreadChannel::drain (port->selectable());
+#endif
DEBUG_TRACE (DEBUG::MidiIO, string_compose ("data available on %1\n", port->name()));
framepos_t now = _session.engine().frame_time();
diff --git a/libs/midi++2/jack_midi_port.cc b/libs/midi++2/jack_midi_port.cc
index 57ca2b3629..3220ca5b55 100644
--- a/libs/midi++2/jack_midi_port.cc
+++ b/libs/midi++2/jack_midi_port.cc
@@ -58,7 +58,9 @@ JackMIDIPort::JackMIDIPort (string const & name, Flags flags, jack_client_t* jac
, _last_write_timestamp (0)
, output_fifo (512)
, input_fifo (1024)
+#ifndef WIN32
, xthread (true)
+#endif
{
assert (jack_client);
init (name, flags);
@@ -73,7 +75,9 @@ JackMIDIPort::JackMIDIPort (const XMLNode& node, jack_client_t* jack_client)
, _last_write_timestamp (0)
, output_fifo (512)
, input_fifo (1024)
+#ifndef WIN32
, xthread (true)
+#endif
{
assert (jack_client);
@@ -170,7 +174,9 @@ JackMIDIPort::cycle_start (pframes_t nframes)
}
if (event_count) {
+#ifndef WIN32
xthread.wakeup ();
+#endif
}
}
}
diff --git a/libs/midi++2/midi++/jack_midi_port.h b/libs/midi++2/midi++/jack_midi_port.h
index a8859387a4..f91c7dab83 100644
--- a/libs/midi++2/midi++/jack_midi_port.h
+++ b/libs/midi++2/midi++/jack_midi_port.h
@@ -57,7 +57,13 @@ class JackMIDIPort : public Port {
int write (const byte *msg, size_t msglen, timestamp_t timestamp);
int read (byte *buf, size_t bufsize);
void drain (int check_interval_usecs);
- int selectable () const { return xthread.selectable(); }
+ int selectable () const {
+#ifdef WIN32
+ return false;
+#else
+ return xthread.selectable();
+#endif
+ }
pframes_t nframes_this_cycle() const { return _nframes_this_cycle; }
@@ -80,7 +86,9 @@ private:
RingBuffer< Evoral::Event<double> > output_fifo;
Evoral::EventRingBuffer<timestamp_t> input_fifo;
Glib::Threads::Mutex output_fifo_lock;
+#ifndef WIN32
CrossThreadChannel xthread;
+#endif
int create_port ();
diff --git a/libs/midi++2/midi++/port.h b/libs/midi++2/midi++/port.h
index 439760115c..d4f03b593e 100644
--- a/libs/midi++2/midi++/port.h
+++ b/libs/midi++2/midi++/port.h
@@ -27,7 +27,9 @@
#include <pthread.h>
#include "pbd/xml++.h"
+#ifndef WIN32
#include "pbd/crossthread.h"
+#endif
#include "pbd/signals.h"
#include "pbd/ringbuffer.h"