summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wx/audio_plot.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc
index 9b2e6b1b0..2098adb40 100644
--- a/src/wx/audio_plot.cc
+++ b/src/wx/audio_plot.cc
@@ -227,8 +227,9 @@ AudioPlot::plot_rms (wxGraphicsPath& path, int channel) const
}
p = sqrt (p / smoothing.size ());
-
- path.AddLineToPoint (_db_label_width + i * _x_scale, y_for_linear (p));
+
+ int const ind = max (0, i - int(smoothing.size() / 2));
+ path.AddLineToPoint (_db_label_width + ind * _x_scale, y_for_linear (p));
}
}