File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/libprojectM/MilkdropPreset Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -76,15 +76,17 @@ void CustomWaveform::Draw(const PerFrameContext& presetPerFrameContext)
7676
7777 int const maxSampleCount{m_spectrum ? Audio::SpectrumSamples : Audio::WaveformSamples};
7878
79+ int sampleCount = std::min (maxSampleCount, static_cast <int >(*m_perFrameContext.samples ));
80+ sampleCount -= m_sep;
81+
7982 // Initialize and execute per-frame code
8083 LoadPerFrameEvaluationVariables (presetPerFrameContext);
8184 m_perFrameContext.ExecutePerFrameCode ();
8285
8386 // Copy Q and T vars to per-point context
8487 InitPerPointEvaluationVariables ();
8588
86- int sampleCount = std::min (maxSampleCount, static_cast <int >(*m_perFrameContext.samples ));
87- sampleCount -= m_sep;
89+ sampleCount = std::min (maxSampleCount, static_cast <int >(*m_perFrameContext.samples ));
8890
8991 // If there aren't enough samples to draw a single line or dot, skip drawing the waveform.
9092 if ((m_useDots && sampleCount < 1 ) || sampleCount < 2 )
You can’t perform that action at this time.
0 commit comments