add libardour code for going completely silent after a compile-time defined number...
[ardour.git] / libs / ardour / async_midi_port.cc
index 21b59dec00241bacfaa3a9b11acba2fb19fb932d..d6d9a953aaa61ca471aa90ae3857356765669c01 100644 (file)
@@ -37,10 +37,6 @@ using namespace ARDOUR;
 using namespace std;
 using namespace PBD;
 
-namespace Evoral {
-       template class EventRingBuffer<MIDI::timestamp_t>;
-}
-
 pthread_t AsyncMIDIPort::_process_thread;
 
 #define port_engine AudioEngine::instance()->port_engine()
@@ -53,9 +49,7 @@ AsyncMIDIPort::AsyncMIDIPort (string const & name, PortFlags flags)
        , have_timer (false)
        , output_fifo (512)
        , input_fifo (1024)
-#ifndef PLATFORM_WINDOWS
-       , xthread (true)
-#endif
+       , _xthread (true)
 {
 }
 
@@ -64,7 +58,7 @@ AsyncMIDIPort::~AsyncMIDIPort ()
 }
 
 void
-AsyncMIDIPort::set_timer (boost::function<framecnt_t (void)>& f)
+AsyncMIDIPort::set_timer (boost::function<MIDI::framecnt_t (void)>& f)
 {
        timer = f;
        have_timer = true;
@@ -136,11 +130,9 @@ AsyncMIDIPort::cycle_start (MIDI::pframes_t nframes)
                        input_fifo.write (when, (Evoral::EventType) 0, (*b).size(), (*b).buffer());
                }
 
-#ifndef PLATFORM_WINDOWS
                if (!mb.empty()) {
-                       xthread.wakeup ();
+                       _xthread.wakeup ();
                }
-#endif
        }
 }