Skip to content

Commit 249305f

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 7ea533a commit 249305f

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
@@ -104,7 +104,7 @@ void CustomWaveform::Draw(const PerFrameContext& presetPerFrameContext)
104104
// PCM data smoothing
105105
const int offset1 = m_spectrum ? 0 : (maxSampleCount - sampleCount) / 2 - m_sep / 2;
106106
const int offset2 = m_spectrum ? 0 : (maxSampleCount - sampleCount) / 2 + m_sep / 2;
107-
const int t = m_spectrum ? static_cast<int>(static_cast<float>(maxSampleCount - m_sep) / static_cast<float>(sampleCount)) : 1;
107+
const float t = m_spectrum ? static_cast<float>(maxSampleCount - m_sep) / static_cast<float>(sampleCount) : 1.0f;
108108
const float mix1 = std::pow(m_smoothing * 0.98f, 0.5f);
109109
const float mix2 = 1.0f - mix1;
110110

0 commit comments

Comments
 (0)