Vapor: sync automation state of multi-channel surround pans
This commit is contained in:
parent
2579bb6dd4
commit
11e508cbe6
@ -62,6 +62,7 @@ public:
|
||||
|
||||
void setup_visual_links ();
|
||||
void sync_visual_link_to (std::shared_ptr<SurroundPannable>);
|
||||
void sync_auto_state_with (std::shared_ptr<SurroundPannable>);
|
||||
|
||||
bool touching() const;
|
||||
|
||||
|
@ -130,6 +130,12 @@ SurroundPannable::sync_visual_link_to (std::shared_ptr<SurroundPannable> other)
|
||||
pan_pos_z->add_visually_linked_control (other->pan_pos_z);
|
||||
}
|
||||
|
||||
void
|
||||
SurroundPannable::sync_auto_state_with (std::shared_ptr<SurroundPannable> other)
|
||||
{
|
||||
other->pan_pos_x->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&SurroundPannable::control_auto_state_changed, this, _1));
|
||||
}
|
||||
|
||||
void
|
||||
SurroundPannable::foreach_pan_control (boost::function<void(std::shared_ptr<AutomationControl>)> f) const
|
||||
{
|
||||
@ -143,7 +149,7 @@ SurroundPannable::foreach_pan_control (boost::function<void(std::shared_ptr<Auto
|
||||
void
|
||||
SurroundPannable::control_auto_state_changed (AutoState new_state)
|
||||
{
|
||||
if (_responding_to_control_auto_state_change) {
|
||||
if (_responding_to_control_auto_state_change || _auto_state == new_state) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -228,6 +228,12 @@ SurroundSend::add_pannable ()
|
||||
add_control (p->pan_size);
|
||||
add_control (p->pan_snap);
|
||||
add_control (p->binaural_render_mode);
|
||||
|
||||
for (uint32_t i = 0; i < _pannable.size (); ++i) {
|
||||
_pannable[i]->sync_auto_state_with (p);
|
||||
p->sync_auto_state_with (_pannable[i]);
|
||||
}
|
||||
|
||||
_pannable.push_back (p);
|
||||
|
||||
_change_connections.drop_connections ();
|
||||
|
Loading…
Reference in New Issue
Block a user