 
         // setup audio session
         let session = AVAudioSession.sharedInstance()
-        try! session.setCategory(AVAudioSessionCategoryPlayAndRecord)
+        try! session.setCategory(AVAudioSessionCategoryRecord)
+
+        
+
         
         // initialize and prepare the recorder
+        
+        
+        
         try! audioRecorder = AVAudioRecorder(URL: filePath!, settings: [:])
+        
+
         
         audioRecorder.delegate = self
         

        
        audioRecorder.stop()
        let audioSession = AVAudioSession.sharedInstance()
        try! audioSession.setActive(false)

        

    
    var audioRecorder:AVAudioRecorder!
    var recordedAudio: RecordedAudio!

    
    override func viewDidLoad() {
        super.viewDidLoad()
