public void startRecording()

in src/android/AudioPlayer.java [160:192]


    public void startRecording(String file) {
        String errorMessage;
        switch (this.mode) {
        case PLAY:
            errorMessage = "AudioPlayer Error: Can't record in play mode.";
            sendErrorStatus(MEDIA_ERR_ABORTED, errorMessage);
            break;
        case NONE:
            this.audioFile = file;
            this.recorder = new MediaRecorder();
            this.recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
            this.recorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS); // RAW_AMR);
            this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); //AMR_NB);
            this.tempFile = createAudioFilePath(null);
            this.recorder.setOutputFile(this.tempFile);
            try {
                this.recorder.prepare();
                this.recorder.start();
                this.setState(STATE.MEDIA_RUNNING);
                return;
            } catch (IllegalStateException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }

            sendErrorStatus(MEDIA_ERR_ABORTED, null);
            break;
        case RECORD:
            errorMessage = "AudioPlayer Error: Already recording.";
            sendErrorStatus(MEDIA_ERR_ABORTED, errorMessage);
        }
    }