 
     audioEngine = AVAudioEngine()
 
-    guard let inputNode = audioEngine.inputNode else {
+    guard let inputNode = audioEngine?.inputNode else {
       throw Error.InputNodeMissing
     }
 

    }

    captureSession.startRunning()
    audioEngine.prepare()
    try audioEngine.start()
  }

  public func stop() {
    if audioEngine != nil {
        audioEngine.stop()
        audioEngine.reset()
        audioEngine = nil
        captureSession.stopRunning()
    }
  }

  func setupAudio() {


  var audioChannel: AVCaptureAudioChannel?
  let captureSession = AVCaptureSession()
  private var audioEngine: AVAudioEngine?
  private let session = AVAudioSession.sharedInstance()
  private let bus = 0

