 // MARK: - Private
 
 fileprivate extension WaveformAnalyzer {
-    private var silenceDbThreshold: Float { return -50.0 } // everything below -50 dB will be clipped
-    
     func waveformSamples(
             count requiredNumberOfSamples: Int,
             qos: DispatchQoS.QoSClass,


/// Calculates the waveform of the initialized asset URL.
public class WaveformAnalyzer {
    private let assetReader: AVAssetReader
    private let audioAssetTrack: AVAssetTrack


        self.assetReader = assetReader
        self.audioAssetTrack = assetTrack
    }

    /// Calculates the amplitude envelope of the initialized audio asset URL, downsampled to the required `count` amount of samples.
    /// Calls the completionHandler on a background thread.
    /// - Parameter count: amount of samples to be calculated. Downsamples.
    /// - Parameter qos: QoS of the DispatchQueue the calculations are performed (and returned) on.
    /// - Parameter completionHandler: called from a background thread. Returns the sampled result or nil in edge-error cases.
    public func samples(count: Int, qos: DispatchQoS.QoSClass = .userInitiated, completionHandler: @escaping (_ amplitudes: [Float]?) -> ()) {
        waveformSamples(count: count, qos: qos, fftBands: nil) { analysis in
            completionHandler(analysis?.amplitudes)
