From f55d4a97f47ea5f758deddade2ac8fdc3806eaab Mon Sep 17 00:00:00 2001 From: yoyofr Date: Wed, 19 Nov 2025 12:26:28 +0100 Subject: [PATCH] Fix wrong type used in PCM smoothing in custom waves. Signed-off-by: Kai Blaschke --- src/libprojectM/MilkdropPreset/CustomWaveform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libprojectM/MilkdropPreset/CustomWaveform.cpp b/src/libprojectM/MilkdropPreset/CustomWaveform.cpp index 2185afda7..e3f94056b 100644 --- a/src/libprojectM/MilkdropPreset/CustomWaveform.cpp +++ b/src/libprojectM/MilkdropPreset/CustomWaveform.cpp @@ -115,7 +115,7 @@ void CustomWaveform::Draw(const PerFrameContext& presetPerFrameContext) // PCM data smoothing const int offset1 = m_spectrum ? 0 : (maxSampleCount - sampleCount) / 2 - m_sep / 2; const int offset2 = m_spectrum ? 0 : (maxSampleCount - sampleCount) / 2 + m_sep / 2; - const int t = m_spectrum ? static_cast(static_cast(maxSampleCount - m_sep) / static_cast(sampleCount)) : 1; + const float t = m_spectrum ? static_cast(maxSampleCount - m_sep) / static_cast(sampleCount) : 1.0f; const float mix1 = std::pow(m_smoothing * 0.98f, 0.5f); const float mix2 = 1.0f - mix1;