mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Fix waveform update when channel-count changes
7434478a35 introduced a race, IOchange triggers updating the
GUI and re-configuring processors. The latter needs to complete
first, otherwise Track::n_channels() returns the previous
channel count.
This commit is contained in:
parent
43d52fe41a
commit
134b2162ba
2 changed files with 16 additions and 9 deletions
|
|
@ -321,6 +321,8 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
||||||
track()->FreezeChange.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::map_frozen, this), gui_context());
|
track()->FreezeChange.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::map_frozen, this), gui_context());
|
||||||
track()->SpeedChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::speed_changed, this), gui_context());
|
track()->SpeedChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::speed_changed, this), gui_context());
|
||||||
|
|
||||||
|
track()->ChanCountChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::chan_count_changed, this), gui_context());
|
||||||
|
|
||||||
/* pick up the correct freeze state */
|
/* pick up the correct freeze state */
|
||||||
map_frozen ();
|
map_frozen ();
|
||||||
|
|
||||||
|
|
@ -2404,15 +2406,19 @@ RouteTimeAxisView::io_changed (IOChange /*change*/, void */*src*/)
|
||||||
{
|
{
|
||||||
reset_meter ();
|
reset_meter ();
|
||||||
if (_route && !no_redraw) {
|
if (_route && !no_redraw) {
|
||||||
AudioStreamView* asv = dynamic_cast<AudioStreamView*>(_view);
|
request_redraw ();
|
||||||
if (asv) {
|
}
|
||||||
/* this needs to happen with the disk-reader's I/O changed,
|
}
|
||||||
* however there is no dedicated signal for this, and in almost
|
|
||||||
* call cases it follows I/O changes.
|
void
|
||||||
* This is similar to ARDOUR_UI::cleanup_peakfiles, and
|
RouteTimeAxisView::chan_count_changed ()
|
||||||
* re-loads wave-form displays. */
|
{
|
||||||
asv->reload_waves ();
|
AudioStreamView* asv = dynamic_cast<AudioStreamView*>(_view);
|
||||||
}
|
if (_route && !no_redraw && asv) {
|
||||||
|
/* This is similar to ARDOUR_UI::cleanup_peakfiles, and
|
||||||
|
* re-loads wave-form displays. */
|
||||||
|
asv->reload_waves ();
|
||||||
|
reset_meter ();
|
||||||
request_redraw ();
|
request_redraw ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,7 @@ public:
|
||||||
void reset_meter ();
|
void reset_meter ();
|
||||||
void clear_meter ();
|
void clear_meter ();
|
||||||
void io_changed (ARDOUR::IOChange, void *);
|
void io_changed (ARDOUR::IOChange, void *);
|
||||||
|
void chan_count_changed ();
|
||||||
void meter_changed ();
|
void meter_changed ();
|
||||||
void effective_gain_display () { gm.effective_gain_display(); }
|
void effective_gain_display () { gm.effective_gain_display(); }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue