13
0

Disable non-realtime midi ports in windows build - THIS NEEDS FIXING

This commit is contained in:
Paul Davis 2013-07-13 08:26:54 -04:00
parent a0ada1f233
commit eddcc868ba
4 changed files with 19 additions and 1 deletions

View File

@ -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();

View File

@ -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
}
}
}

View File

@ -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 ();

View File

@ -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"