 
   public func start() {
     do {
-      try audioInputProcessor.start()
+      try inputMonitor.start()
       active = true
     } catch {}
   }
 
   public func stop() {
-    audioInputProcessor.stop()
+    inputMonitor.stop()
     frequencies = [Float]()
     active = false
   }

  }
}

// MARK: - AudioInputProcessorDelegate

extension Tuner: AudioInputProcessorDelegate {

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

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

  private lazy var inputMonitor: InputMonitor = { [unowned self] in
    let inputMonitor = InputMonitor(
      bufferSize: self.bufferSize,
      delegate: self
    )

    return inputMonitor
    }()

  private lazy var frequencyDetector: FrequencyDetector = { [unowned self] in
