mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 01:26:31 +01:00
fix meter(s) when mixer-strip is switched to AuxSend
This commit is contained in:
parent
1d39cf7543
commit
55c7ce98ab
3 changed files with 11 additions and 2 deletions
|
|
@ -274,18 +274,24 @@ void
|
||||||
GainMeterBase::setup_meters (int len)
|
GainMeterBase::setup_meters (int len)
|
||||||
{
|
{
|
||||||
int meter_width = 5;
|
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) {
|
switch (_width) {
|
||||||
case Wide:
|
case Wide:
|
||||||
//meter_ticks1_area.show();
|
//meter_ticks1_area.show();
|
||||||
//meter_ticks2_area.show();
|
//meter_ticks2_area.show();
|
||||||
meter_metric_area.show();
|
meter_metric_area.show();
|
||||||
if (_route && _route->shared_peak_meter()->input_streams().n_total() == 1) {
|
if (meter_channels == 1) {
|
||||||
meter_width = 10;
|
meter_width = 10;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Narrow:
|
case Narrow:
|
||||||
if (_route && _route->shared_peak_meter()->input_streams().n_total() > 1) {
|
if (meter_channels > 1) {
|
||||||
meter_width = 4;
|
meter_width = 4;
|
||||||
}
|
}
|
||||||
//meter_ticks1_area.hide();
|
//meter_ticks1_area.hide();
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ LevelMeterBase::set_meter (PeakMeter* meter)
|
||||||
_meter_type_connection.disconnect();
|
_meter_type_connection.disconnect();
|
||||||
|
|
||||||
_meter = meter;
|
_meter = meter;
|
||||||
|
color_changed = true;
|
||||||
|
|
||||||
if (_meter) {
|
if (_meter) {
|
||||||
_meter->ConfigurationChanged.connect (_configuration_connection, parent_invalidator, boost::bind (&LevelMeterBase::configuration_changed, this, _1, _2), gui_context());
|
_meter->ConfigurationChanged.connect (_configuration_connection, parent_invalidator, boost::bind (&LevelMeterBase::configuration_changed, this, _1, _2), gui_context());
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
#include "ardour/audio_track.h"
|
#include "ardour/audio_track.h"
|
||||||
#include "ardour/audioengine.h"
|
#include "ardour/audioengine.h"
|
||||||
#include "ardour/internal_send.h"
|
#include "ardour/internal_send.h"
|
||||||
|
#include "ardour/meter.h"
|
||||||
#include "ardour/midi_track.h"
|
#include "ardour/midi_track.h"
|
||||||
#include "ardour/pannable.h"
|
#include "ardour/pannable.h"
|
||||||
#include "ardour/panner.h"
|
#include "ardour/panner.h"
|
||||||
|
|
@ -1863,6 +1864,7 @@ MixerStrip::show_send (boost::shared_ptr<Send> send)
|
||||||
|
|
||||||
set_current_delivery (send);
|
set_current_delivery (send);
|
||||||
|
|
||||||
|
send->meter()->set_type(_route->shared_peak_meter()->get_type());
|
||||||
send->set_metering (true);
|
send->set_metering (true);
|
||||||
_current_delivery->DropReferences.connect (send_gone_connection, invalidator (*this), boost::bind (&MixerStrip::revert_to_default_display, this), gui_context());
|
_current_delivery->DropReferences.connect (send_gone_connection, invalidator (*this), boost::bind (&MixerStrip::revert_to_default_display, this), gui_context());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue