From 2784c32f45f9b1de219005c8180e74c87469dabb Mon Sep 17 00:00:00 2001 From: saker Date: Mon, 30 Dec 2024 07:03:08 -0500 Subject: [PATCH] Update SampleWaveform.cpp Co-authored-by: szeli1 <143485814+szeli1@users.noreply.github.com> --- src/gui/SampleWaveform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/SampleWaveform.cpp b/src/gui/SampleWaveform.cpp index 94b7b05aa2c..3d6caa1952c 100644 --- a/src/gui/SampleWaveform.cpp +++ b/src/gui/SampleWaveform.cpp @@ -51,8 +51,8 @@ void SampleWaveform::visualize(Parameters parameters, QPainter& painter, const Q const auto endSample = parameters.buffer + endSampleIndex; const auto [minPeak, maxPeak] = std::minmax_element(&startSample->left(), &endSample->right()); - const auto yMin = rect.center().y() - *minPeak * parameters.amplification * verticalScale; - const auto yMax = rect.center().y() - *maxPeak * parameters.amplification * verticalScale; + const auto yMin = rect.center().y() - (*minPeak) * parameters.amplification * verticalScale; + const auto yMax = rect.center().y() - (*maxPeak) * parameters.amplification * verticalScale; painter.drawLine(xPos, yMin, xPos, yMax); }