summaryrefslogtreecommitdiff
path: root/gtk2_ardour/gain_meter.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-02-19 18:32:00 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2014-02-19 23:25:08 -0500
commit55c7ce98abc285e4bf90d937530bc69168032189 (patch)
tree8aabd6d8c31cd30441bb15f3fee7a440bcbfdd4b /gtk2_ardour/gain_meter.cc
parent1d39cf754355805d2281232905808670e32f7d6e (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.cc10
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();