mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Fix various MIDI locking issues.
Attempt to make mistakes much less likely in the future by statically requiring caller to pass scoped locks where necessary.
This commit is contained in:
parent
1fa9edd872
commit
a706755710
24 changed files with 228 additions and 174 deletions
|
|
@ -193,7 +193,8 @@ MidiStreamView::display_region(MidiRegionView* region_view, bool load_model)
|
|||
}
|
||||
|
||||
if (load_model) {
|
||||
source->load_model();
|
||||
Glib::Threads::Mutex::Lock lm(source->mutex());
|
||||
source->load_model(lm);
|
||||
}
|
||||
|
||||
if (!source->model()) {
|
||||
|
|
@ -225,7 +226,8 @@ MidiStreamView::update_contents_metrics(boost::shared_ptr<Region> r)
|
|||
{
|
||||
boost::shared_ptr<MidiRegion> mr = boost::dynamic_pointer_cast<MidiRegion>(r);
|
||||
if (mr) {
|
||||
mr->midi_source(0)->load_model();
|
||||
Glib::Threads::Mutex::Lock lm(mr->midi_source(0)->mutex());
|
||||
mr->midi_source(0)->load_model(lm);
|
||||
_range_dirty = update_data_note_range(
|
||||
mr->model()->lowest_note(),
|
||||
mr->model()->highest_note());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue