13
0

Update Waveform display when channel-count changes

This commit is contained in:
Robin Gareus 2020-04-08 17:40:32 +02:00
parent cfd95340b1
commit 7434478a35
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 25 additions and 0 deletions

View File

@ -177,6 +177,20 @@ AudioStreamView::redisplay_track ()
layer_regions();
}
void
AudioStreamView::reload_waves ()
{
list<RegionView *>::iterator i;
for (i = region_views.begin(); i != region_views.end(); ++i) {
AudioRegionView* arv = dynamic_cast<AudioRegionView*> (*i);
if (!arv) {
continue;
}
arv->delete_waves();
arv->create_waves();
}
}
void
AudioStreamView::setup_rec_box ()
{

View File

@ -67,6 +67,8 @@ public:
RegionView* create_region_view (boost::shared_ptr<ARDOUR::Region>, bool, bool);
void set_selected_points (PointSelection&);
void reload_waves ();
private:
void setup_rec_box ();
void rec_peak_range_ready (samplepos_t start, ARDOUR::samplecnt_t cnt, boost::weak_ptr<ARDOUR::Source> src);

View File

@ -2404,6 +2404,15 @@ RouteTimeAxisView::io_changed (IOChange /*change*/, void */*src*/)
{
reset_meter ();
if (_route && !no_redraw) {
AudioStreamView* asv = dynamic_cast<AudioStreamView*>(_view);
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.
* This is similar to ARDOUR_UI::cleanup_peakfiles, and
* re-loads wave-form displays. */
asv->reload_waves ();
}
request_redraw ();
}
}