   private let bufferSize: AVAudioFrameCount
   private var frequencies = [Float]()
 
-  private lazy var audioInputProcessor: AudioInputProcessor = { [unowned self] in
-    let audioInputProcessor = AudioInputProcessor(
+  private lazy var inputMonitor: InputMonitor = { [unowned self] in
+    let inputMonitor = InputMonitor(
       bufferSize: self.bufferSize,
       delegate: self
     )
 
-    return audioInputProcessor
+    return inputMonitor
     }()
 
   private lazy var frequencyDetector: FrequencyDetector = { [unowned self] in


  public func start() {
    do {
      try audioInputProcessor.start()
      active = true
    } catch {}
  }

  public func stop() {
    audioInputProcessor.stop()
    frequencies = [Float]()
    active = false
  }

  }
}

// MARK: - InputMonitorDelegate

extension Tuner: InputMonitorDelegate {

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