13
0

Fix for-loop condition (comma has no effect)

This commit is contained in:
Robin Gareus 2019-12-05 18:23:49 +01:00
parent 7d94e1e1f9
commit 551702b9e9
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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];