amend 67f9f6fd: no recursive ReaderLock

This commit is contained in:
Robin Gareus 2017-06-03 12:31:59 +02:00
parent c2cb60ea03
commit d662e6e0bf
2 changed files with 9 additions and 4 deletions

View file

@ -64,7 +64,13 @@ class LIBARDOUR_API SlavableAutomationControl : public AutomationControl
int set_state (XMLNode const&, int);
XMLNode& get_state();
bool find_next_event (double now, double end, Evoral::ControlEvent& next_event) const;
bool find_next_event (double n, double e, Evoral::ControlEvent& ev) const
{
Glib::Threads::RWLock::ReaderLock lm (master_lock);
return find_next_event_locked (n, e, ev);
}
bool find_next_event_locked (double now, double end, Evoral::ControlEvent& next_event) const;
protected:

View file

@ -345,9 +345,8 @@ SlavableAutomationControl::clear_masters ()
}
bool
SlavableAutomationControl::find_next_event (double now, double end, Evoral::ControlEvent& next_event) const
SlavableAutomationControl::find_next_event_locked (double now, double end, Evoral::ControlEvent& next_event) const
{
Glib::Threads::RWLock::ReaderLock lm (master_lock);
if (_masters.empty()) {
return false;
}
@ -363,7 +362,7 @@ SlavableAutomationControl::find_next_event (double now, double end, Evoral::Cont
boost::shared_ptr<SlavableAutomationControl> sc
= boost::dynamic_pointer_cast<SlavableAutomationControl>(ac);
if (sc && sc->find_next_event (now, end, next_event)) {
if (sc && sc->find_next_event_locked (now, end, next_event)) {
rv = true;
}