             let audioContext = audioContext
             else { return }
 
+        print("rendering")
+        
         renderingInProgress = true
         delegate?.waveformViewWillRender?(self)
         

    }
    
    private func finish(with image: UIImage?) {
        // TODO: nil this out or use a finished flag to not call this mulitple times?
        completionHandler(image)
    }
    
    private func render() {

    /// The "zero" level (in dB)
    fileprivate var noiseFloor: CGFloat = -50.0
    
    public override var isAsynchronous: Bool { return true }
    
    private var _isExecuting = false
    public override var isExecuting: Bool { return _isExecuting }
    
    private var _isFinished = false
    public override var isFinished: Bool { return _isFinished }
    
    private var renderedImage: UIImage?
    
    public init(audioContext: FDAudioContext, completionHandler: @escaping (_ image: UIImage?) -> ()) {
        self.audioContext = audioContext
        self.completionHandler = completionHandler
        
        self.sampleRange = 0..<audioContext.totalSamples
        
        super.init()
        
        self.completionBlock = { [weak self] in
            guard let `self` = self else { return }
            self.completionHandler(self.renderedImage)
        }
    }
    
    public override func start() {
        guard !isExecuting && !isFinished && !isCancelled else { return }
        
        willChangeValue(forKey: "isExecuting")
        _isExecuting = true
        didChangeValue(forKey: "isExecuting")
        
        if #available(iOS 8.0, *) {
            DispatchQueue.global(qos: .background).async { self.render() }
        } else {
