VBAP GUI depends on signal-position (not parameter changes)

This commit is contained in:
Robin Gareus 2014-01-11 23:29:36 +01:00
parent d3e1d54280
commit 0669bb455b
4 changed files with 9 additions and 2 deletions

View File

@ -77,8 +77,7 @@ Panner2d::Panner2d (boost::shared_ptr<PannerShell> p, int32_t h)
{
panner_shell->Changed.connect (connections, invalidator (*this), boost::bind (&Panner2d::handle_state_change, this), gui_context());
panner_shell->pannable()->pan_azimuth_control->Changed.connect (connections, invalidator(*this), boost::bind (&Panner2d::handle_position_change, this), gui_context());
panner_shell->pannable()->pan_width_control->Changed.connect (connections, invalidator(*this), boost::bind (&Panner2d::handle_position_change, this), gui_context());
panner_shell->panner()->SignalPositionChanged.connect (panconnect, invalidator(*this), boost::bind (&Panner2d::handle_position_change, this), gui_context());
drag_target = 0;
set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK);
@ -199,6 +198,8 @@ Panner2d::add_speaker (const AngularVector& a)
void
Panner2d::handle_state_change ()
{
panconnect.drop_connections();
panner_shell->panner()->SignalPositionChanged.connect (panconnect, invalidator(*this), boost::bind (&Panner2d::handle_position_change, this), gui_context());
queue_draw ();
}

View File

@ -136,6 +136,7 @@ class Panner2d : public Gtk::DrawingArea
void label_signals ();
PBD::ScopedConnectionList connections;
PBD::ScopedConnectionList panconnect;
/* cartesian coordinates in GTK units ; adjust to same but on a circle of radius 1.0
and centered in the middle of our area

View File

@ -87,6 +87,9 @@ public:
virtual void reset () = 0;
/* azimut, width or elevation updated -> recalc signal_position -> emit Changed */
PBD::Signal0<void> SignalPositionChanged;
void set_automation_state (AutoState);
AutoState automation_state() const;
void set_automation_style (AutoStyle);

View File

@ -185,6 +185,8 @@ VBAPanner::update ()
s->direction = AngularVector (center, elevation);
compute_gains (s->desired_gains, s->desired_outputs, s->direction.azi, s->direction.ele);
}
SignalPositionChanged(); /* emit */
}
void