 
                 self?.state = .FinishRecord
             }
-
-            /*
-            if YepAudioService.sharedManager.audioRecorder?.currentTime < YepConfig.AudioRecord.shortestDuration {
-
-                YepAudioService.sharedManager.endRecord()
-
-                YepAlert.alertSorry(message: NSLocalizedString("Voice recording time is too short!", comment: ""), inViewController: self, withDismissAction: { [weak self] in
-                    self?.state = .Default
-                })
-
-                return
-            }
-            
-            YepAudioService.sharedManager.endRecord()
-             */
 
         } else {
             proposeToAccess(.Microphone, agreed: { [weak self] in

        if let feedVoice = feedVoice {
            performSegueWithIdentifier("showNewFeed", sender: Box(feedVoice))
        }

        /*
        guard let fileURL = voiceFileURL where !sampleValues.isEmpty else {
            return
        }

        let voiceSampleValues = sampleValues

        let finalCount = limitedAudioSamplesCount(voiceSampleValues.count)

        println("voiceSampleValues.count: \(voiceSampleValues.count)")
        println("finalCount: \(finalCount)")

        // 再做一个抽样
        let limitedSampleValues = averageSamplingFrom(voiceSampleValues, withCount: finalCount)
        println("limitedSampleValues: \(limitedSampleValues.count)")

        let feedVoice = FeedVoice(fileURL: fileURL, sampleValuesCount: voiceSampleValues.count, limitedSampleValues: limitedSampleValues)

        performSegueWithIdentifier("showNewFeed", sender: Box(feedVoice))
         */
    }

    /*
    @objc private func checkVoiceRecordValue(sender: AnyObject) {

        if let audioRecorder = YepAudioService.sharedManager.audioRecorder {

            if audioRecorder.recording {
                audioRecorder.updateMeters()
                let normalizedValue = pow(10, audioRecorder.averagePowerForChannel(0)/40)
                let value = CGFloat(normalizedValue)

                sampleValues.append(value)
                voiceRecordSampleView.appendSampleValue(value)
                //println("value: \(value)")
            }
        }
    }
     */

    @IBAction private func voiceRecord(sender: UIButton) {


                        self?.view.layoutIfNeeded()
                    }, completion: { _ in })
                })
            }
        }
    }

    private var sampleValues: [CGFloat] = [] {
        didSet {
