 
   public func frequencyDetector(frequencyDetector: FrequencyDetector,
     didRetrieveFrequency frequency: Float) {
-      let pitch = Pitch(frequency: Double(averageFrequency(frequency)))
+      let pitch = Pitch(frequency: Double(frequency))
       delegate?.tunerDidRecievePitch(self, pitch: pitch)
   }
 }

    }()

  private lazy var frequencyDetector: FrequencyDetector = { [unowned self] in
    let frequencyDetector = FrequencyDetector(
      sampleRate: 44100.0,
      bufferSize: self.bufferSize,
      delegate: self)

    return frequencyDetector
    }()

  // MARK: - Initialization

  public init(bufferSize: AVAudioFrameCount = 2048, delegate: TunerDelegate?) {
    self.bufferSize = bufferSize
    self.delegate = delegate
  }

extension Tuner: AudioInputProcessorDelegate {

  public func audioInputProcessor(audioInputProcessor: AudioInputProcessor,
    didReceiveBuffer buffer: AVAudioPCMBuffer, atTime time: AVAudioTime) {
      frequencyDetector.readBuffer(buffer, atTime: time)
  }
}

