Skip to content

Commit f55d4a9

Browse files
yoyofrkblaschke
authored andcommitted
Fix wrong type used in PCM smoothing in custom waves.
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
1 parent 0ac5c24 commit f55d4a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libprojectM/MilkdropPreset/CustomWaveform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void CustomWaveform::Draw(const PerFrameContext& presetPerFrameContext)
115115
// PCM data smoothing
116116
const int offset1 = m_spectrum ? 0 : (maxSampleCount - sampleCount) / 2 - m_sep / 2;
117117
const int offset2 = m_spectrum ? 0 : (maxSampleCount - sampleCount) / 2 + m_sep / 2;
118-
const int t = m_spectrum ? static_cast<int>(static_cast<float>(maxSampleCount - m_sep) / static_cast<float>(sampleCount)) : 1;
118+
const float t = m_spectrum ? static_cast<float>(maxSampleCount - m_sep) / static_cast<float>(sampleCount) : 1.0f;
119119
const float mix1 = std::pow(m_smoothing * 0.98f, 0.5f);
120120
const float mix2 = 1.0f - mix1;
121121

0 commit comments

Comments
 (0)