Fix code style
[ardour.git] / libs / ardour / ardour / async_midi_port.h
index 46d5f94a91b315368b89ca3d7081371b4bf56ffd..3639304f7783ff603f78702f9a3f566abc814430 100644 (file)
@@ -47,13 +47,15 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port {
                AsyncMIDIPort (std::string const &, PortFlags);
                ~AsyncMIDIPort ();
 
-               /* called from an RT context */
+               bool flush_at_cycle_start () const { return _flush_at_cycle_start; }
+               void set_flush_at_cycle_start (bool en) { _flush_at_cycle_start = en; }
 
+               /* called from an RT context */
                void cycle_start (pframes_t nframes);
                void cycle_end (pframes_t nframes);
 
                /* called from non-RT context */
-               void parse (framecnt_t timestamp);
+               void parse (samplecnt_t timestamp);
                int write (const MIDI::byte *msg, size_t msglen, MIDI::timestamp_t timestamp);
                int read (MIDI::byte *buf, size_t bufsize);
                /* waits for output to be cleared */
@@ -70,7 +72,7 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port {
 
                /* Not selectable; use ios() */
                int selectable() const { return -1; }
-               void set_timer (boost::function<framecnt_t (void)>&);
+               void set_timer (boost::function<samplecnt_t (void)>&);
 
                static void set_process_thread (pthread_t);
                static pthread_t get_process_thread () { return _process_thread; }
@@ -79,9 +81,10 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port {
        private:
                bool                    _currently_in_cycle;
                MIDI::timestamp_t       _last_write_timestamp;
+               bool                    _flush_at_cycle_start;
                bool                    have_timer;
-               boost::function<framecnt_t (void)> timer;
-               RingBuffer< Evoral::Event<double> > output_fifo;
+               boost::function<samplecnt_t (void)> timer;
+               PBD::RingBuffer< Evoral::Event<double> > output_fifo;
                EventRingBuffer<MIDI::timestamp_t> input_fifo;
                Glib::Threads::Mutex output_fifo_lock;
                CrossThreadChannel _xthread;