Hey, I have a problem with andriod programing when I try to record and then play the file that was just recored. I can both record and play the sound but the quality stinks. Its not just bad is really hard to listen to and sound abit like its a computer generated voice... I use the andriod SDK-emulator. The code that sets up the recording looks like this;
MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(path);
recorder.prepare();
recorder.start();
And the code playing the file later looks like this;
MediaPlayer mp = new MediaPlayer();
mp.reset();
mp.setDataSource(path);
mp.prepare();
mp.start();
I dont know what part that makes the audiofile sound really bad... or if its just the emulator that makes it bad and that it would work on a real phone. I would love some help with this.
/Nick