From a0a20673f2f68ac6e6450ddf130892b4439f7a3c Mon Sep 17 00:00:00 2001 From: Megamouse Date: Wed, 26 Feb 2025 19:43:57 +0100 Subject: [PATCH] Fix some warning --- rpcs3/Emu/Cell/Modules/cellMic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/Modules/cellMic.cpp b/rpcs3/Emu/Cell/Modules/cellMic.cpp index 0cad02959d..62ae150f7f 100644 --- a/rpcs3/Emu/Cell/Modules/cellMic.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMic.cpp @@ -590,7 +590,7 @@ f32 microphone_device::calculate_energy_level() sum_squares += normalized_sample * normalized_sample; } - const f32 rms = num_samples > 0 ? std::sqrt(sum_squares / num_samples) : 0.0f; + const f32 rms = num_samples > 0 ? static_cast(std::sqrt(sum_squares / num_samples)) : 0.0f; constexpr f32 decibels_max = 90.0f; const f32 decibels_relative = 20.0f * std::log10(std::max(rms, 0.00001f)); const f32 decibels = decibels_max + (decibels_relative * 0.5f);