VBAP GUI depends on signal-position (not parameter changes)
This commit is contained in:
parent
1bf9c4c990
commit
60fe9606f4
|
@ -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->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->panner()->SignalPositionChanged.connect (panconnect, 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());
|
|
||||||
|
|
||||||
drag_target = 0;
|
drag_target = 0;
|
||||||
set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK);
|
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
|
void
|
||||||
Panner2d::handle_state_change ()
|
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 ();
|
queue_draw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,6 +136,7 @@ class Panner2d : public Gtk::DrawingArea
|
||||||
void label_signals ();
|
void label_signals ();
|
||||||
|
|
||||||
PBD::ScopedConnectionList connections;
|
PBD::ScopedConnectionList connections;
|
||||||
|
PBD::ScopedConnectionList panconnect;
|
||||||
|
|
||||||
/* cartesian coordinates in GTK units ; adjust to same but on a circle of radius 1.0
|
/* cartesian coordinates in GTK units ; adjust to same but on a circle of radius 1.0
|
||||||
and centered in the middle of our area
|
and centered in the middle of our area
|
||||||
|
|
|
@ -100,6 +100,9 @@ public:
|
||||||
|
|
||||||
virtual void reset () = 0;
|
virtual void reset () = 0;
|
||||||
|
|
||||||
|
/* azimut, width or elevation updated -> recalc signal_position -> emit Changed */
|
||||||
|
PBD::Signal0<void> SignalPositionChanged;
|
||||||
|
|
||||||
void set_automation_state (AutoState);
|
void set_automation_state (AutoState);
|
||||||
AutoState automation_state() const;
|
AutoState automation_state() const;
|
||||||
void set_automation_style (AutoStyle);
|
void set_automation_style (AutoStyle);
|
||||||
|
|
|
@ -189,6 +189,8 @@ VBAPanner::update ()
|
||||||
s->direction = AngularVector (center, elevation);
|
s->direction = AngularVector (center, elevation);
|
||||||
compute_gains (s->desired_gains, s->desired_outputs, s->direction.azi, s->direction.ele);
|
compute_gains (s->desired_gains, s->desired_outputs, s->direction.azi, s->direction.ele);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SignalPositionChanged(); /* emit */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue
Block a user