13
0

fix output metering for Sends (Aux and External)

This commit is contained in:
Robin Gareus 2014-01-13 10:50:22 +01:00 committed by Paul Davis
parent 7e1e7e7629
commit 533e0091b7
2 changed files with 17 additions and 1 deletions

View File

@ -77,6 +77,7 @@ class LIBARDOUR_API Send : public Delivery
private: private:
/* disallow copy construction */ /* disallow copy construction */
Send (const Send&); Send (const Send&);
void panshell_changed ();
int set_state_2X (XMLNode const &, int); int set_state_2X (XMLNode const &, int);

View File

@ -29,6 +29,7 @@
#include "ardour/buffer_set.h" #include "ardour/buffer_set.h"
#include "ardour/meter.h" #include "ardour/meter.h"
#include "ardour/io.h" #include "ardour/io.h"
#include "ardour/panner_shell.h"
#include "i18n.h" #include "i18n.h"
@ -86,6 +87,10 @@ Send::Send (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMas
_meter.reset (new PeakMeter (_session, name())); _meter.reset (new PeakMeter (_session, name()));
add_control (_amp->gain_control ()); add_control (_amp->gain_control ());
if (panner_shell()) {
panner_shell()->Changed.connect_same_thread (*this, boost::bind (&Send::panshell_changed, this));
}
} }
Send::~Send () Send::~Send ()
@ -284,7 +289,7 @@ Send::can_support_io_configuration (const ChanCount& in, ChanCount& out)
bool bool
Send::configure_io (ChanCount in, ChanCount out) Send::configure_io (ChanCount in, ChanCount out)
{ {
if (!_amp->configure_io (in, out) || !_meter->configure_io (in, out)) { if (!_amp->configure_io (in, out)) {
return false; return false;
} }
@ -292,11 +297,21 @@ Send::configure_io (ChanCount in, ChanCount out)
return false; return false;
} }
if (!_meter->configure_io (ChanCount (DataType::AUDIO, pan_outs()), ChanCount (DataType::AUDIO, pan_outs()))) {
return false;
}
reset_panner (); reset_panner ();
return true; return true;
} }
void
Send::panshell_changed ()
{
_meter->configure_io (ChanCount (DataType::AUDIO, pan_outs()), ChanCount (DataType::AUDIO, pan_outs()));
}
bool bool
Send::set_name (const string& new_name) Send::set_name (const string& new_name)
{ {