summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/MidiBuffer.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-22 23:51:00 +0000
committerDavid Robillard <d@drobilla.net>2007-09-22 23:51:00 +0000
commitc1160ffc8a5dfb38891b0faa6373c9eecdd8e4c9 (patch)
tree1baf40b7a90bc96c4b0832103ff0cdabdf1ed1a6 /src/libs/engine/MidiBuffer.hpp
parent4bd53e016b8bb912e48d77e756720516d876d5c2 (diff)
downloadingen-c1160ffc8a5dfb38891b0faa6373c9eecdd8e4c9.tar.gz
ingen-c1160ffc8a5dfb38891b0faa6373c9eecdd8e4c9.tar.bz2
ingen-c1160ffc8a5dfb38891b0faa6373c9eecdd8e4c9.zip
Type oblivious set_port_value interface.
git-svn-id: http://svn.drobilla.net/lad/ingen@765 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/MidiBuffer.hpp')
-rw-r--r--src/libs/engine/MidiBuffer.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/engine/MidiBuffer.hpp b/src/libs/engine/MidiBuffer.hpp
index 15548625..a7db7e77 100644
--- a/src/libs/engine/MidiBuffer.hpp
+++ b/src/libs/engine/MidiBuffer.hpp
@@ -57,18 +57,21 @@ public:
inline void rewind() const { _position = 0; }
inline void clear() { if (_joined_buf) reset(_this_nframes); }
inline void reset(SampleCount nframes) {
+ _latest_stamp = 0;
_position = 0;
_buf->event_count = 0;
_buf->size = 0;
}
double increment() const;
+ double latest_stamp() const { return _latest_stamp; }
double get_event(double* timestamp, uint32_t* size, unsigned char** data) const;
bool append(double timestamp, uint32_t size, const unsigned char* data);
private:
+ double _latest_stamp; ///< Highest timestamp of all events
uint32_t _this_nframes; ///< Current cycle nframes
mutable uint32_t _position; ///< Index into _buf
MidiBuffer* _joined_buf; ///< Buffer to mirror, if joined