Remove subtle blip on waveform in analysis example (#410)

This commit is contained in:
Eric Lewis 2018-12-12 11:24:43 -05:00 committed by Yotam Mann
parent 81f6ae1144
commit 2886bd10e5

View file

@ -97,7 +97,7 @@
waveContext.lineJoin = "round";
waveContext.lineWidth = 6;
waveContext.strokeStyle = waveformGradient;
waveContext.moveTo(0, (values[0] / 255) * canvasHeight);
waveContext.moveTo(0, (values[0] + 1) / 2 * canvasHeight);
for (var i = 1, len = values.length; i < len; i++){
var val = (values[i] + 1) / 2;
var x = canvasWidth * (i / len);