summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_state_tracker.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-10-24 13:26:56 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-10-24 13:26:56 +0000
commitf8fe64a91e7ae7f6ac761e8ae16a485ed70fb994 (patch)
tree7b2942e9bdbb4f1b52d53640b62411c8da9d4e0b /libs/ardour/ardour/midi_state_tracker.h
parentdbc75e074912fc3647899711e838d4e5b675e175 (diff)
(FULL commit) start of a nominal debug tracing system, with 64 bits available for flags; track notes by region in MidiPlaylist, and resolve them if they are left hanging at region boundaries. note: MIDI playback is still not working 100% though its better now.
git-svn-id: svn://localhost/ardour2/branches/3.0@5903 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/midi_state_tracker.h')
-rw-r--r--libs/ardour/ardour/midi_state_tracker.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/libs/ardour/ardour/midi_state_tracker.h b/libs/ardour/ardour/midi_state_tracker.h
index 7b95772cac..76a669838a 100644
--- a/libs/ardour/ardour/midi_state_tracker.h
+++ b/libs/ardour/ardour/midi_state_tracker.h
@@ -23,9 +23,12 @@
#include <bitset>
#include "ardour/midi_buffer.h"
+namespace Evoral {
+template <typename T> class EventSink;
+}
+
namespace ARDOUR {
-template <typename T> class MidiRingBuffer;
/** Tracks played notes, so they can be resolved in potential stuck note
* situations (e.g. looping, transport stop, etc).
@@ -39,14 +42,17 @@ public:
void add (uint8_t note, uint8_t chn);
void remove (uint8_t note, uint8_t chn);
void resolve_notes (MidiBuffer& buffer, nframes64_t time);
- void resolve_notes (MidiRingBuffer<nframes_t>& buffer, nframes64_t time);
+ void resolve_notes (Evoral::EventSink<nframes_t>& buffer, nframes64_t time);
void dump (std::ostream&);
void reset ();
+ bool empty() const { return _on == 0; }
+ uint16_t on() const { return _on; }
private:
void track_note_onoffs(const Evoral::MIDIEvent<MidiBuffer::TimeType>& event);
- uint8_t _active_notes[128*16];
+ uint8_t _active_notes[128*16];
+ uint16_t _on;
};