summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_source.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour/midi_source.h')
-rw-r--r--libs/ardour/ardour/midi_source.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h
index 4815263739..1ff0a08f71 100644
--- a/libs/ardour/ardour/midi_source.h
+++ b/libs/ardour/ardour/midi_source.h
@@ -36,8 +36,9 @@
namespace ARDOUR {
class MidiChannelFilter;
-class MidiStateTracker;
+class MidiCursor;
class MidiModel;
+class MidiStateTracker;
template<typename T> class MidiRingBuffer;
@@ -87,18 +88,18 @@ class LIBARDOUR_API MidiSource : virtual public Source, public boost::enable_sha
* \param tracker an optional pointer to MidiStateTracker object, for note on/off tracking.
* \param filtered Parameters whose MIDI messages will not be returned.
*/
-
virtual framecnt_t midi_read (const Lock& lock,
Evoral::EventSink<framepos_t>& dst,
framepos_t source_start,
framepos_t start,
framecnt_t cnt,
Evoral::Range<framepos_t>* loop_range,
+ MidiCursor& cursor,
MidiStateTracker* tracker,
MidiChannelFilter* filter,
const std::set<Evoral::Parameter>& filtered,
- const double pulse,
- const double start_beats) const;
+ const double pulse,
+ const double start_beats) const;
/** Write data from a MidiRingBuffer to this source.
* @param source Source to read from.
@@ -175,10 +176,11 @@ class LIBARDOUR_API MidiSource : virtual public Source, public boost::enable_sha
/** Reset cached information (like iterators) when things have changed.
* @param lock Source lock, which must be held by caller.
- * @param notes If non-NULL, currently active notes are added to this set.
*/
- void invalidate(const Glib::Threads::Mutex::Lock& lock,
- std::set<Evoral::Sequence<Evoral::Beats>::WeakNotePtr>* notes=NULL);
+ void invalidate(const Glib::Threads::Mutex::Lock& lock);
+
+ /** Thou shalt not emit this directly, use invalidate() instead. */
+ mutable PBD::Signal1<void, bool> Invalidated;
void set_note_mode(const Glib::Threads::Mutex::Lock& lock, NoteMode mode);
@@ -230,11 +232,7 @@ class LIBARDOUR_API MidiSource : virtual public Source, public boost::enable_sha
boost::shared_ptr<MidiModel> _model;
bool _writing;
- mutable Evoral::Sequence<Evoral::Beats>::const_iterator _model_iter;
- mutable bool _model_iter_valid;
-
- mutable Evoral::Beats _length_beats;
- mutable framepos_t _last_read_end;
+ Evoral::Beats _length_beats;
/** The total duration of the current capture. */
framepos_t _capture_length;