             if newValue !== waveformRenderOperation {
                 print("cancelling")
                 waveformRenderOperation?.cancel()
+                renderForCurrentAssetFailed = false
             }
         }
     }


        let waveformRenderOperation = FDWaveformRenderOperation(audioContext: audioContext) { image in
            DispatchQueue.main.async {
                print("done")
                self.waveformImage = image
                self.cachedSampleRange = renderSampleRange
                self.renderingInProgress = false
                self.setNeedsLayout()
                self.delegate?.waveformViewDidRender?(self)


    /// If the cached image is insufficient for the current frame
    fileprivate func cacheIsDirty() -> Bool {
        guard !renderForCurrentAssetFailed else { return false }
        guard
            let image = waveformImage,
            let cachedSampleRange = cachedSampleRange
            else { return true }
        
        if cachedSampleRange.lowerBound < minMaxX(zoomStartSamples - Int(CGFloat(cachedSampleRange.count) * horizontalMaximumBleed), min: 0, max: totalSamples) {
            return true
        }
