             let center = imageMaxHeight.halved
             let path = UIBezierPath()
             for (index, sample) in samples.enumerated() {
-                //ensure silence is drawn as well
+                let offset = CGFloat(index)
                 let amplitude = max(CGFloat(sample), 1.0)
                 
-                let x: CGFloat = CGFloat(index * pixelsPerSample)
-                let y: CGFloat = center - amplitude.halved
+                let x = offset * pixelsPerSample
+                let y = center - amplitude.halved
                 
                 path.addVerticalLine(at: CGPoint(x: x, y: y), ofHeight: amplitude)
             }
             path.close()
             
-            path.lineWidth = 1.0
+            path.lineWidth = lineWidth
             
             graphColor.setStroke()
             path.stroke()

            //operating in place and trimming buffer is better on memory and slightly faster than duplicating data
            samples.removeLast(samples.count - downSampledLength)
            
            // add noisefloor to make values positive amplitude in db
            vDSP.add(abs(noiseFloor), samples, result: &samples)
        }
        else {

            var zero: Float = 1;
            vDSP_vdbcon(samples, 1, &zero, &samples, 1, sampleCount, 1);
            
            //decimate samples
            vDSP_desamp(samples,
                        vDSP_Stride(samplesPerPixel),
