3
0
Fork 0
forked from suyu/suyu

Merge pull request #1148 from lioncash/audio-warn

audio_core/filter: Add explicit cast to assignment in Process()
This commit is contained in:
bunnei 2018-08-21 17:04:53 -04:00 committed by GitHub
commit 16b83fac9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,7 @@ void Filter::Process(std::vector<s16>& signal) {
out[0][ch] = b0 * in[0][ch] + b1 * in[1][ch] + b2 * in[2][ch] - a1 * out[1][ch] -
a2 * out[2][ch];
signal[i * 2 + ch] = std::clamp(out[0][ch], -32768.0, 32767.0);
signal[i * 2 + ch] = static_cast<s16>(std::clamp(out[0][ch], -32768.0, 32767.0));
}
}
}