 extension PitchEngine: PitchDetectorDelegate {
 
   public func pitchDetectorDidUpdateFrequency(pitchDetector: PitchDetector, frequency: Float) {
-    //delegate averageFrequency(frequency)
+    delegate?.pitchEngineDidRecieveFrequency(self, frequency: averageFrequency(frequency))
   }
 }
 


  // MARK: - Initialization

  public init(bufferSize: AVAudioFrameCount = 2048) {
    self.bufferSize = bufferSize
  }

  // MARK: - Helpers

}

public class PitchEngine {

  public weak var delegate: PitchEngineDelegate?

  private let bufferSize: AVAudioFrameCount
  private var frequencies = [Float]()
