fix SConstruct so that it can build from a git checkout rather than an svn checkout
[ardour.git] / libs / ardour / ardour / midi_port.h
index a2bc259a6e529cdf5807cae85d044dab6c09ea78..485834aaffb0d7d7dc0c6ab47af88e72e1174e41 100644 (file)
 #ifndef __ardour_midi_port_h__
 #define __ardour_midi_port_h__
 
-#include <sigc++/signal.h>
-#include <pbd/failed_constructor.h>
-#include <ardour/ardour.h>
-#include <jack/jack.h>
-#include <jack/midiport.h>
-#include <ardour/port.h>
-#include <ardour/buffer.h>
+#include <ardour/base_midi_port.h>
 
 namespace ARDOUR {
 
 class MidiEngine;
 
-class MidiPort : public Port {
+class MidiPort : public BaseMidiPort, public PortFacade {
    public:
-       virtual ~MidiPort();
-       
-       DataType type() const { return DataType(DataType::MIDI); }
+       ~MidiPort();
 
-       MidiBuffer& get_buffer() {
-               assert(_nframes_this_cycle > 0);
-               return *_buffer;
-       }
-       
-       void cycle_start(jack_nframes_t nframes);
-       void cycle_end();
+       void reset ();
 
-       size_t capacity() { return _buffer->capacity(); }
-       size_t size()     { return _buffer->size(); }
-       
-       /** Assumes that the port is an output port */
-       void silence (jack_nframes_t nframes, jack_nframes_t offset) {
-               _buffer->silence(nframes, offset);
-       }
+       void cycle_start (nframes_t nframes, nframes_t offset);
+       void cycle_end (nframes_t nframes, nframes_t offset);
 
   protected:
        friend class AudioEngine;
 
-       MidiPort (jack_port_t *port);
-       
-       /* engine isn't supposed to access below here */
-
-       MidiBuffer*    _buffer;
-       jack_nframes_t _nframes_this_cycle;
+       MidiPort (const std::string& name, Flags, bool external, nframes_t bufsize);
 };
  
 } // namespace ARDOUR