summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/midi_source.h5
-rw-r--r--libs/ardour/ardour/source.h5
2 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h
index 0bc431a8d8..b17f78b912 100644
--- a/libs/ardour/ardour/midi_source.h
+++ b/libs/ardour/ardour/midi_source.h
@@ -85,6 +85,11 @@ class MidiSource : virtual public Source
virtual void load_model(bool lock=true, bool force_reload=false) = 0;
virtual void destroy_model() = 0;
+ /** This must be called with the source lock held whenever the
+ * source/model contents have been changed (reset iterators/cache/etc).
+ */
+ void invalidate();
+
void set_note_mode(NoteMode mode);
void set_timeline_position (int64_t pos);
diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h
index 943b7b444c..d89c33c749 100644
--- a/libs/ardour/ardour/source.h
+++ b/libs/ardour/ardour/source.h
@@ -115,8 +115,9 @@ class Source : public SessionObject, public ARDOUR::Readable, public boost::nonc
virtual const Evoral::TimeConverter<double, nframes_t>& time_converter() const {
return Evoral::IdentityConverter<double, nframes_t>();
}
-
- Flag flags() const { return _flags; }
+
+ Glib::Mutex& mutex() { return _lock; }
+ Flag flags() const { return _flags; }
protected:
DataType _type;