         self.assetReader = assetReader
         self.audioAssetTrack = assetTrack
     }
-    
-    /// Returns the calculated waveform of the initialized asset URL.
+
+    /// 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)


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


// MARK: - Private

fileprivate extension WaveformAnalyzer {
    func waveformSamples(
            count requiredNumberOfSamples: Int,
            qos: DispatchQoS.QoSClass,
