diff options
author | Robin Gareus <robin@gareus.org> | 2014-01-13 10:50:22 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-01-13 10:50:22 +0100 |
commit | d9cf6880b6d65665a55aed212503de0820db6f40 (patch) | |
tree | 05e4e34a1e1b8a47c89571b98632c90739ad2f39 | |
parent | 0559c1babb7d2fe0f884f8639df7a7b265ed6bad (diff) |
fix output metering for Sends (Aux and External)
-rw-r--r-- | libs/ardour/ardour/send.h | 1 | ||||
-rw-r--r-- | libs/ardour/send.cc | 17 |
2 files changed, 17 insertions, 1 deletions
diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index 1a21d1d050..118110f05a 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -77,6 +77,7 @@ class Send : public Delivery private: /* disallow copy construction */ Send (const Send&); + void panshell_changed (); int set_state_2X (XMLNode const &, int); diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc index e74fd7f8ce..2c3d8f23ae 100644 --- a/libs/ardour/send.cc +++ b/libs/ardour/send.cc @@ -29,6 +29,7 @@ #include "ardour/buffer_set.h" #include "ardour/meter.h" #include "ardour/io.h" +#include "ardour/panner_shell.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())); add_control (_amp->gain_control ()); + + if (panner_shell()) { + panner_shell()->Changed.connect_same_thread (*this, boost::bind (&Send::panshell_changed, this)); + } } Send::~Send () @@ -284,7 +289,7 @@ Send::can_support_io_configuration (const ChanCount& in, ChanCount& out) bool 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; } @@ -292,11 +297,21 @@ Send::configure_io (ChanCount in, ChanCount out) return false; } + if (!_meter->configure_io (ChanCount (DataType::AUDIO, pan_outs()), ChanCount (DataType::AUDIO, pan_outs()))) { + return false; + } + reset_panner (); return true; } +void +Send::panshell_changed () +{ + _meter->configure_io (ChanCount (DataType::AUDIO, pan_outs()), ChanCount (DataType::AUDIO, pan_outs())); +} + bool Send::set_name (const string& new_name) { |