         setSliders(active: false)
     }
 
-    func setupUIForPlaying () {
-        let recordedDuration = player != nil ? player.audioFile?.duration  : 0
+    func setupUIForPlaying() {
+        let recordedDuration = player != nil ? player.audioFile?.duration : 0
         infoLabel.text = "Recorded: \(String(format: "%0.1f", recordedDuration!)) seconds"
         mainButton.setTitle("Play", for: .normal)
         state = .readyToPlay

                try recorder.record()
            } catch { AKLog("Errored recording.") }

        case .recording :
            // Microphone monitoring is muted
            micBooster.gain = 0
            tape = recorder.audioFile!
            player.load(audioFile: tape)

            if let _ = player.audioFile?.duration {
                recorder.stop()
                tape.exportAsynchronously(name: "TempTestFile.m4a",
                                          baseDir: .documents,
                                          exportFormat: .m4a) {_, exportError in
                    if let error = exportError {
                        AKLog("Export Failed \(error)")
                    } else {

        loopButton.setTitle(Constants.empty, for: UIControl.State.disabled)
    }

    func setupUIForRecording() {
        state = .readyToRecord
        infoLabel.text = "Ready to record"
        mainButton.setTitle("Record", for: .normal)
