summaryrefslogtreecommitdiff
path: root/libs/audiographer
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-12-05 18:23:49 +0100
committerRobin Gareus <robin@gareus.org>2019-12-05 18:23:49 +0100
commit551702b9e9e8766ba2f9723d23585c914803bf89 (patch)
treec4eca0164941a29aae4318cbe241e9ceb8cd01ad /libs/audiographer
parent7d94e1e1f9aa1416ec4ab5f87e6eeb23ca812828 (diff)
Fix for-loop condition (comma has no effect)
Diffstat (limited to 'libs/audiographer')
-rw-r--r--libs/audiographer/src/general/analyser.cc4
-rw-r--r--libs/audiographer/src/general/loudness_reader.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/libs/audiographer/src/general/analyser.cc b/libs/audiographer/src/general/analyser.cc
index 930a2a95ab..639ab5d9ef 100644
--- a/libs/audiographer/src/general/analyser.cc
+++ b/libs/audiographer/src/general/analyser.cc
@@ -149,7 +149,7 @@ Analyser::process (ProcessContext<float> const & ctx)
}
float const * const data = ctx.data ();
- for (unsigned int c = 0; c < _channels, c < _dbtp_plugins.size (); ++c) {
+ for (unsigned int c = 0; c < _channels && c < _dbtp_plugins.size (); ++c) {
for (s = 0; s < n_samples; ++s) {
_bufs[0][s] = data[s * _channels + c];
}
@@ -247,7 +247,7 @@ Analyser::result ()
}
const unsigned cmask = _result.n_channels - 1; // [0, 1]
- for (unsigned int c = 0; c < _channels, c < _dbtp_plugins.size (); ++c) {
+ for (unsigned int c = 0; c < _channels && c < _dbtp_plugins.size (); ++c) {
Vamp::Plugin::FeatureSet features = _dbtp_plugins.at(c)->getRemainingFeatures ();
if (!features.empty () && features.size () == 2) {
_result.have_dbtp = true;
diff --git a/libs/audiographer/src/general/loudness_reader.cc b/libs/audiographer/src/general/loudness_reader.cc
index 495d653d79..351b15f483 100644
--- a/libs/audiographer/src/general/loudness_reader.cc
+++ b/libs/audiographer/src/general/loudness_reader.cc
@@ -121,7 +121,7 @@ LoudnessReader::process (ProcessContext<float> const & ctx)
}
}
- for (unsigned int c = processed_channels; c < _channels, c < _dbtp_plugins.size (); ++c) {
+ for (unsigned int c = processed_channels; c < _channels && c < _dbtp_plugins.size (); ++c) {
samplecnt_t s;
float const * const d = ctx.data ();
for (s = 0; s < n_samples; ++s) {
@@ -154,7 +154,7 @@ LoudnessReader::get_normalize_gain (float target_lufs, float target_dbtp)
}
}
- for (unsigned int c = 0; c < _channels, c < _dbtp_plugins.size(); ++c) {
+ for (unsigned int c = 0; c < _channels && c < _dbtp_plugins.size(); ++c) {
Vamp::Plugin::FeatureSet features = _dbtp_plugins.at(c)->getRemainingFeatures ();
if (!features.empty () && features.size () == 2) {
const float dbtp = features[0][0].values[0];