                         }
                     }
                 }
+                
+                
+                let audioDevice:AVCaptureDevice = AVCaptureDevice.defaultDeviceWithMediaType(AVMediaTypeAudio)
+                let audioDeviceInput:AVCaptureDeviceInput = try AVCaptureDeviceInput.init(device: audioDevice)
+                
+                if (self.session.canAddInput(audioDeviceInput)) {
+                    self.session.addInput(audioDeviceInput)
+                }
+                
+                let movieFileOut:AVCaptureMovieFileOutput = AVCaptureMovieFileOutput.init()
+                if (self.session.canAddOutput(movieFileOut)) {
+                    self.session.addOutput(movieFileOut)
+                }
+                
+                
+                let stillImageOutput:AVCaptureStillImageOutput = AVCaptureStillImageOutput.init()
+                if (self.session.canAddOutput(stillImageOutput)) {
+                    self.session.addOutput(stillImageOutput)
+                    
+                    stillImageOutput.outputSettings = [AVVideoCodecKey:AVVideoCodecJPEG]
+                    stillImageOutput.highResolutionStillImageOutputEnabled = true
+                    
+                    self.stillImageOutput = stillImageOutput
+                }
+                
                 self.session.commitConfiguration()
-                
             } catch let error as NSError {
-                NSLog("Could not create video device input: %@", error )
+                NSLog("Could not create device input: %@", error)
                 self.setupResult = CameraManualSetupResult.SessionConfigurationFailed
             }
-        
         };
     }
     


            do {
                // create and add VideoDeviceInput
                let videoDevice = Camera.deviceWithMediaType(AVMediaTypeVideo, preferringPosition: AVCaptureDevicePosition.Back)
                let videoDeviceInput: AVCaptureDeviceInput = try AVCaptureDeviceInput.init(device: videoDevice)
                
                self.session.beginConfiguration()
                if (self.session.canAddInput(videoDeviceInput)) {
                    self.session .addInput(videoDeviceInput)
                    self.videoDeviceInput = videoDeviceInput

            break;
        }
        
        setupCaptureSession(preview, complete: complete)
    }
    
    internal func turnOn(complete:CameraSetupComplete) {
        dispatch_async(self.sessionQueue) {
            if (self.setupResult == .Success) {
                // Only setup observers and start the session running if setup succeeded.
                self.addObservers()
                self.session.startRunning()
                self.sessionRunning = self.session.running
            }
            dispatch_async(dispatch_get_main_queue()) {
                complete(self.setupResult)
            };
        }
    }
    
    internal func turnOff(complete: (Void) -> (Void)) {
        dispatch_async(self.sessionQueue) { 
            if (self.setupResult == CameraManualSetupResult.Success) {
                self.session.stopRunning()
                self.removeObservers();
            }
            dispatch_async(dispatch_get_main_queue()) {
                complete()
            };
        }
    }
    
    private func addObservers() {
    }
    
    private func removeObservers() {
    }
    
    // Setup the capture session.
