From 0057a47e41b178d0b47a7e0f50a6f48a36af254d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 21 Aug 2018 12:32:08 -0400 Subject: audio_core/filter: Add explicit cast to assignment in Process() Previously this would cause warnings about implicit conversions to s16 from a double --- src/audio_core/algorithm/filter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/audio_core/algorithm/filter.cpp b/src/audio_core/algorithm/filter.cpp index 403b8503f..9fcd0614d 100644 --- a/src/audio_core/algorithm/filter.cpp +++ b/src/audio_core/algorithm/filter.cpp @@ -46,7 +46,7 @@ void Filter::Process(std::vector& 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(std::clamp(out[0][ch], -32768.0, 32767.0)); } } } -- cgit v1.2.3