mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
NO-OP: whitespace
This commit is contained in:
parent
6ad3ce7bff
commit
dd30b8b31e
1 changed files with 65 additions and 70 deletions
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include "ardour/amp.h"
|
#include "ardour/amp.h"
|
||||||
#include "ardour/audio_buffer.h"
|
#include "ardour/audio_buffer.h"
|
||||||
|
#include "ardour/audioengine.h"
|
||||||
#include "ardour/delayline.h"
|
#include "ardour/delayline.h"
|
||||||
#include "ardour/internal_return.h"
|
#include "ardour/internal_return.h"
|
||||||
#include "ardour/internal_send.h"
|
#include "ardour/internal_send.h"
|
||||||
|
|
@ -33,11 +34,13 @@
|
||||||
#include "ardour/panner_shell.h"
|
#include "ardour/panner_shell.h"
|
||||||
#include "ardour/route.h"
|
#include "ardour/route.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/audioengine.h"
|
|
||||||
|
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
|
|
||||||
namespace ARDOUR { class MuteMaster; class Pannable; }
|
namespace ARDOUR {
|
||||||
|
class MuteMaster;
|
||||||
|
class Pannable;
|
||||||
|
}
|
||||||
|
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
|
@ -152,8 +155,9 @@ InternalSend::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sa
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we have to copy the input, because we may alter the buffers with the amp
|
/* we have to copy the input, because we may alter the buffers with the amp
|
||||||
// in-place, which a send must never do.
|
* in-place, which a send must never do.
|
||||||
|
*/
|
||||||
|
|
||||||
if (_panshell && !_panshell->bypassed () && role () != Listen) {
|
if (_panshell && !_panshell->bypassed () && role () != Listen) {
|
||||||
if (mixbufs.count ().n_audio () > 0) {
|
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);
|
//assert (mixbufs.available().get (DataType::AUDIO) >= bufs_audio);
|
||||||
|
|
||||||
/* Copy bufs into mixbufs, going round bufs more than once if necessary
|
/* 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;
|
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 ();
|
gain_t tgain = target_gain ();
|
||||||
|
|
||||||
if (tgain != _current_gain) {
|
if (tgain != _current_gain) {
|
||||||
|
/* target gain has changed, fade in/out */
|
||||||
/* target gain has changed */
|
|
||||||
|
|
||||||
_current_gain = Amp::apply_gain (mixbufs, _session.nominal_sample_rate (), nframes, _current_gain, tgain);
|
_current_gain = Amp::apply_gain (mixbufs, _session.nominal_sample_rate (), nframes, _current_gain, tgain);
|
||||||
|
|
||||||
} else if (tgain == GAIN_COEFF_ZERO) {
|
} 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 ();
|
_meter->reset ();
|
||||||
Amp::apply_simple_gain (mixbufs, nframes, GAIN_COEFF_ZERO);
|
Amp::apply_simple_gain (mixbufs, nframes, GAIN_COEFF_ZERO);
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
} else if (tgain != GAIN_COEFF_UNITY) {
|
} else if (tgain != GAIN_COEFF_UNITY) {
|
||||||
|
|
||||||
/* target gain has not changed, but is not zero or unity */
|
/* target gain has not changed, but is not zero or unity */
|
||||||
Amp::apply_simple_gain (mixbufs, nframes, tgain);
|
Amp::apply_simple_gain (mixbufs, nframes, tgain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* apply fader gain automation */
|
||||||
_amp->set_gain_automation_buffer (_session.send_gain_automation_buffer ());
|
_amp->set_gain_automation_buffer (_session.send_gain_automation_buffer ());
|
||||||
_amp->setup_gain_automation (start_sample, end_sample, nframes);
|
_amp->setup_gain_automation (start_sample, end_sample, nframes);
|
||||||
_amp->run (mixbufs, start_sample, end_sample, speed, nframes, true);
|
_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);
|
_send_delay->run (mixbufs, start_sample, end_sample, speed, nframes, true);
|
||||||
|
|
||||||
/* consider metering */
|
/* consider metering */
|
||||||
|
|
||||||
if (_metering) {
|
if (_metering) {
|
||||||
if (_amp->gain_control ()->get_value () == GAIN_COEFF_ZERO) {
|
if (_amp->gain_control ()->get_value () == GAIN_COEFF_ZERO) {
|
||||||
_meter->reset ();
|
_meter->reset ();
|
||||||
|
|
@ -326,10 +321,9 @@ InternalSend::set_state (const XMLNode& node, int version)
|
||||||
Send::set_state (node, version);
|
Send::set_state (node, version);
|
||||||
|
|
||||||
if (node.get_property ("target", _send_to_id)) {
|
if (node.get_property ("target", _send_to_id)) {
|
||||||
|
|
||||||
/* if we're loading a session, the target route may not have been
|
/* 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
|
* create yet. make sure we defer till we are sure that it should
|
||||||
exist.
|
* exist.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!IO::connecting_legal) {
|
if (!IO::connecting_legal) {
|
||||||
|
|
@ -376,16 +370,17 @@ uint32_t
|
||||||
InternalSend::pan_outs () const
|
InternalSend::pan_outs () const
|
||||||
{
|
{
|
||||||
/* the number of targets for our panner is determined by what we are
|
/* the number of targets for our panner is determined by what we are
|
||||||
sending to, if anything.
|
* sending to, if anything.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (_send_to) {
|
if (_send_to) {
|
||||||
return _send_to->internal_return ()->input_streams ().n_audio ();
|
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"
|
* say "don't pan"
|
||||||
*/
|
*/
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue