         }
 
         let recordingBufferLength: AVAudioFrameCount = AKSettings.recordingBufferLength.samplesCount
-        recording = true
+        isRecording = true
 
         AKLog("AKNodeRecorder: recording")
         node.avAudioNode.installTap(

    // The file to record to
    fileprivate var internalAudioFile: AKAudioFile

    fileprivate var recording = false

    // An optional duration for the recording to auto-stop when reached
    open var durationToRecord: Double = 0

    /// True if we are recording.
    open var isRecording: Bool {
        return recording
    }

    /// Duration of recording
    open var recordedDuration: Double {


    /// Stop recording
    open func stop() {
        if isRecording == false {
            AKLog("AKNodeRecorder Warning: Cannot stop recording, already stopped !")
            return
        }

        isRecording = false

        if AKSettings.fixTruncatedRecordings {
            //  delay before stopping so the recording is not truncated.
