summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/port_engine.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-08-01 14:43:12 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-08-01 14:43:12 -0400
commit682ebad62bdc85df151ad0b81dc27cc9f3e71cec (patch)
tree3e283d18fa8609a1f98502a038b9388f8404285a /libs/ardour/ardour/port_engine.h
parent18c68bfd12130b8a3e95c99d3c0472c8b7f377bc (diff)
full compilation and linking (coding not finished, will not run)
Diffstat (limited to 'libs/ardour/ardour/port_engine.h')
-rw-r--r--libs/ardour/ardour/port_engine.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/libs/ardour/ardour/port_engine.h b/libs/ardour/ardour/port_engine.h
index 5992a48a85..e63c52630d 100644
--- a/libs/ardour/ardour/port_engine.h
+++ b/libs/ardour/ardour/port_engine.h
@@ -77,7 +77,7 @@ class PortManager;
class PortEngine {
public:
PortEngine (PortManager& pm) : manager (pm) {}
- virtual ~PortEngine();
+ virtual ~PortEngine() {}
/* We use void* here so that the API can be defined for any implementation.
*
@@ -89,7 +89,6 @@ class PortEngine {
typedef void* PortHandle;
- virtual bool connected() const = 0;
virtual void* private_handle() const = 0;
virtual const std::string& my_name() const = 0;
@@ -125,10 +124,10 @@ class PortEngine {
/* MIDI */
- virtual void midi_event_get (pframes_t& timestamp, size_t& size, uint8_t** buf, void* port_buffer, uint32_t event_index) = 0;
+ virtual int midi_event_get (pframes_t& timestamp, size_t& size, uint8_t** buf, void* port_buffer, uint32_t event_index) = 0;
virtual int midi_event_put (void* port_buffer, pframes_t timestamp, const uint8_t* buffer, size_t size) = 0;
- virtual uint32_t get_midi_event_count (void* port_buffer);
- virtual void midi_clear (void* port_buffer);
+ virtual uint32_t get_midi_event_count (void* port_buffer) = 0;
+ virtual void midi_clear (void* port_buffer) = 0;
/* Monitoring */
@@ -142,7 +141,6 @@ class PortEngine {
virtual void set_latency_range (PortHandle, bool for_playback, LatencyRange) = 0;
virtual LatencyRange get_latency_range (PortHandle, bool for_playback) = 0;
- virtual LatencyRange get_connected_latency_range (PortHandle, int dir) = 0;
/* Discovering physical ports */
@@ -158,7 +156,16 @@ class PortEngine {
virtual void* get_buffer (PortHandle, pframes_t) = 0;
- virtual framecnt_t last_frame_time() const = 0;
+ /* MIDI ports (the ones in libmidi++) need this to be able to correctly
+ * schedule MIDI events within their buffers. It is a bit odd that we
+ * expose this here, because it is also exposed by AudioBackend, but they
+ * only have access to a PortEngine object, not an AudioBackend.
+ *
+ * Return the time according to the sample clock in use when the current
+ * buffer process cycle began.
+ *
+ */
+ virtual pframes_t sample_time_at_cycle_start () = 0;
protected:
PortManager& manager;