 
             self.assetTrack = assetTrack
             loadingInProgress = true
-            self.delegate?.waveformViewWillLoad?(self)
+            delegate?.waveformViewWillLoad?(self)
             asset.loadValuesAsynchronously(forKeys: ["duration"]) {
                 var error: NSError? = nil
                 let status = self.asset!.statusOfValue(forKey: "duration", error: &error)

    /// A portion of the waveform rendering to be highlighted
    @IBInspectable open var progressSamples: Int = 0 {
        didSet {
            if self.totalSamples > 0 {
                let progress = CGFloat(self.progressSamples) / CGFloat(self.totalSamples)
                self.clipping.frame = CGRect(x: 0, y: 0, width: self.frame.size.width * progress, height: self.frame.size.height)
                self.setNeedsLayout()
            }
        }
    }

        context.setShouldAntialias(false)
        context.setAlpha(1.0)
        context.setLineWidth(1.0)
        context.setStrokeColor(wavesColor.cgColor)

        let sampleDrawingScale: CGFloat
        if max == min {
