diff options
author | Robin Gareus <robin@gareus.org> | 2014-02-19 18:32:00 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-02-19 18:32:00 +0100 |
commit | f6541d7addb16ca5aa4462b0094237b2bb147b77 (patch) | |
tree | 4115079195b9815a2e8a132782cdaf9c5afc631a /gtk2_ardour/gain_meter.cc | |
parent | d697a31abf2fa1b0bedcab025188f03611920fdf (diff) |
fix meter(s) when mixer-strip is switched to AuxSend
Diffstat (limited to 'gtk2_ardour/gain_meter.cc')
-rw-r--r-- | gtk2_ardour/gain_meter.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 53dd006224..c2a5071030 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -274,18 +274,24 @@ void GainMeterBase::setup_meters (int len) { int meter_width = 5; + uint32_t meter_channels = 0; + if (_meter) { + meter_channels = _meter->input_streams().n_total(); + } else if (_route) { + meter_channels = _route->shared_peak_meter()->input_streams().n_total(); + } switch (_width) { case Wide: //meter_ticks1_area.show(); //meter_ticks2_area.show(); meter_metric_area.show(); - if (_route && _route->shared_peak_meter()->input_streams().n_total() == 1) { + if (meter_channels == 1) { meter_width = 10; } break; case Narrow: - if (_route && _route->shared_peak_meter()->input_streams().n_total() > 1) { + if (meter_channels > 1) { meter_width = 4; } //meter_ticks1_area.hide(); |