mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
amend 67f9f6fd: no recursive ReaderLock
This commit is contained in:
parent
c2cb60ea03
commit
d662e6e0bf
2 changed files with 9 additions and 4 deletions
|
|
@ -64,7 +64,13 @@ class LIBARDOUR_API SlavableAutomationControl : public AutomationControl
|
||||||
int set_state (XMLNode const&, int);
|
int set_state (XMLNode const&, int);
|
||||||
XMLNode& get_state();
|
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:
|
protected:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -345,9 +345,8 @@ SlavableAutomationControl::clear_masters ()
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
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()) {
|
if (_masters.empty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -363,7 +362,7 @@ SlavableAutomationControl::find_next_event (double now, double end, Evoral::Cont
|
||||||
boost::shared_ptr<SlavableAutomationControl> sc
|
boost::shared_ptr<SlavableAutomationControl> sc
|
||||||
= boost::dynamic_pointer_cast<SlavableAutomationControl>(ac);
|
= 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;
|
rv = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue