                     sampleChannels = Int32(desc.mChannelsPerFrame)
                 }
             }
+
             /// Sanity check
             guard (sampleRate != nil) && (sampleChannels != nil) else {
                 return 0

                    max length * sample channels * sample rate
             */
            var remainingSamples = Int32(maxLength) * sampleChannels! * sampleRate!
            /// start off chromaprint
            chromaprint_start(context, sampleRate!, sampleChannels!)
            

            let audioTrack = audioTracks[0]
            let trackOutput = AVAssetReaderTrackOutput(track: audioTrack, outputSettings: outputSettings)

            /// Get the duration.
            let durationInSeconds = CMTimeGetSeconds(audioTrack.timeRange.duration)

            var sampleRate : Int32?
            var sampleChannels : Int32?
            let descriptions = audioTrack.formatDescriptions
            
            for d in 0..<descriptions.count {
                let item = descriptions[d] as! CMAudioFormatDescriptionRef
                let desc = CMAudioFormatDescriptionGetStreamBasicDescription(item).memory
