13
0

NO-OP: whitespace

This commit is contained in:
Robin Gareus 2020-03-12 01:58:50 +01:00
parent 6ad3ce7bff
commit dd30b8b31e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -26,6 +26,7 @@
#include "ardour/amp.h"
#include "ardour/audio_buffer.h"
#include "ardour/audioengine.h"
#include "ardour/delayline.h"
#include "ardour/internal_return.h"
#include "ardour/internal_send.h"
@ -33,11 +34,13 @@
#include "ardour/panner_shell.h"
#include "ardour/route.h"
#include "ardour/session.h"
#include "ardour/audioengine.h"
#include "pbd/i18n.h"
namespace ARDOUR { class MuteMaster; class Pannable; }
namespace ARDOUR {
class MuteMaster;
class Pannable;
}
using namespace PBD;
using namespace ARDOUR;
@ -152,8 +155,9 @@ InternalSend::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sa
return;
}
// we have to copy the input, because we may alter the buffers with the amp
// in-place, which a send must never do.
/* we have to copy the input, because we may alter the buffers with the amp
* in-place, which a send must never do.
*/
if (_panshell && !_panshell->bypassed () && role () != Listen) {
if (mixbufs.count ().n_audio () > 0) {
@ -202,7 +206,7 @@ InternalSend::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sa
//assert (mixbufs.available().get (DataType::AUDIO) >= bufs_audio);
/* Copy bufs into mixbufs, going round bufs more than once if necessary
to ensure that every mixbuf gets some data.
* to ensure that every mixbuf gets some data.
*/
uint32_t j = 0;
@ -226,31 +230,23 @@ InternalSend::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sa
}
}
/* gain control */
/* main gain control: * mute & bypass/enable */
gain_t tgain = target_gain ();
if (tgain != _current_gain) {
/* target gain has changed */
/* target gain has changed, fade in/out */
_current_gain = Amp::apply_gain (mixbufs, _session.nominal_sample_rate (), nframes, _current_gain, tgain);
} else if (tgain == GAIN_COEFF_ZERO) {
/* we were quiet last time, and we're still supposed to be quiet.
*/
/* we were quiet last time, and we're still supposed to be quiet. */
_meter->reset ();
Amp::apply_simple_gain (mixbufs, nframes, GAIN_COEFF_ZERO);
goto out;
} else if (tgain != GAIN_COEFF_UNITY) {
/* target gain has not changed, but is not zero or unity */
Amp::apply_simple_gain (mixbufs, nframes, tgain);
}
/* apply fader gain automation */
_amp->set_gain_automation_buffer (_session.send_gain_automation_buffer ());
_amp->setup_gain_automation (start_sample, end_sample, nframes);
_amp->run (mixbufs, start_sample, end_sample, speed, nframes, true);
@ -258,7 +254,6 @@ InternalSend::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sa
_send_delay->run (mixbufs, start_sample, end_sample, speed, nframes, true);
/* consider metering */
if (_metering) {
if (_amp->gain_control ()->get_value () == GAIN_COEFF_ZERO) {
_meter->reset ();
@ -326,10 +321,9 @@ InternalSend::set_state (const XMLNode& node, int version)
Send::set_state (node, version);
if (node.get_property ("target", _send_to_id)) {
/* if we're loading a session, the target route may not have been
create yet. make sure we defer till we are sure that it should
exist.
* create yet. make sure we defer till we are sure that it should
* exist.
*/
if (!IO::connecting_legal) {
@ -376,16 +370,17 @@ uint32_t
InternalSend::pan_outs () const
{
/* the number of targets for our panner is determined by what we are
sending to, if anything.
* sending to, if anything.
*/
if (_send_to) {
return _send_to->internal_return ()->input_streams ().n_audio ();
}
return 1; /* zero is more accurate, but 1 is probably safer as a way to
/* zero is more accurate, but 1 is probably safer as a way to
* say "don't pan"
*/
return 1;
}
bool