summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-04-28 21:16:50 +0200
committerRobin Gareus <robin@gareus.org>2019-04-28 21:16:50 +0200
commita156d4f44680a57ae0f1fdfb79b1635d7f7db6f8 (patch)
tree0a60b602af706c322d280cdcc0571906e39cc4ed /libs
parent20bdf5d966459e87003e67e17439ef506b074599 (diff)
NO-OP: whitespace
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/convolver.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/libs/ardour/convolver.cc b/libs/ardour/convolver.cc
index 19bdf64b5b..7af3928079 100644
--- a/libs/ardour/convolver.cc
+++ b/libs/ardour/convolver.cc
@@ -74,7 +74,7 @@ Convolver::Convolver (
boost::shared_ptr<SrcFileSource> sfs (new SrcFileSource(_session, afs, ARDOUR::SrcBest));
_readables.push_back(sfs);
} else {
- _readables.push_back(afs);
+ _readables.push_back (afs);
}
} catch (failed_constructor& err) {
PBD::error << string_compose(_("Convolver: Could not open IR \"%1\"."), path) << endmsg;
@@ -106,7 +106,7 @@ Convolver::reconfigure ()
_max_size = _readables[0]->readable_length ();
uint32_t power_of_two;
- for (power_of_two = 1; 1U << power_of_two < _n_samples; ++power_of_two);
+ for (power_of_two = 1; 1U << power_of_two < _n_samples; ++power_of_two) ;
_n_samples = 1 << power_of_two;
int n_part = std::min ((uint32_t)Convproc::MAXPART, 4 * _n_samples);
@@ -135,10 +135,6 @@ Convolver::reconfigure ()
uint32_t n_imp = n_inputs () * n_outputs ();
uint32_t n_chn = _readables.size ();
-#ifndef NDEBUG
- printf ("Convolver::reconfigure Nin %d Nout %d Nimp %d Nchn %d\n", n_inputs (), n_outputs (), n_imp, n_chn);
-#endif
-
if (_irc == Stereo && n_chn == 3) {
/* ignore 3rd channel */
n_chn = 2;
@@ -148,6 +144,10 @@ Convolver::reconfigure ()
n_imp = 2;
}
+#ifndef NDEBUG
+ printf ("Convolver::reconfigure Nin=%d Nout=%d Nimp=%d Nchn=%d\n", n_inputs (), n_outputs (), n_imp, n_chn);
+#endif
+
assert (n_imp <= 4);
for (uint32_t c = 0; c < n_imp && rv == 0; ++c) {
@@ -178,14 +178,15 @@ Convolver::reconfigure ()
const uint32_t chan_delay = _ir_settings.pre_delay + _ir_settings.channel_delay[c];
#ifndef NDEBUG
- printf ("Convolver map: IR-chn %d: in %d -> out %d (gain: %.1fdB delay; %d)\n", ir_c + 1, io_i + 1, io_o + 1, 20.f * log10f(chan_gain), chan_delay);
+ printf ("Convolver map: IR-chn %d: in %d -> out %d (gain: %.1fdB delay; %d)\n", ir_c + 1, io_i + 1, io_o + 1, 20.f * log10f (chan_gain), chan_delay);
#endif
uint32_t pos = 0;
while (true) {
float ir[8192];
+
samplecnt_t to_read = std::min ((uint32_t)8192, _max_size - pos);
- samplecnt_t ns = r->read (ir, pos, to_read, 0);
+ samplecnt_t ns = r->read (ir, pos, to_read, 0);
if (ns == 0) {
assert (pos == _max_size);