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

    }

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

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

  func setupAudio() {


    audioEngine = AVAudioEngine()

    guard let inputNode = audioEngine?.inputNode else {
      throw Error.InputNodeMissing
    }

