Hi all...
I'm having really trouble there.
When I attempt to play a sound file I have just recorded using
MediaRecorder, it fails when I call myMediaRecorder.prepare(). The
LogCat gives me:
Prepare failed.: status=0xFFFFFFFC
That's what I'm doing:
String path = "/data/data/com.my.packages.name/cache/record.dat"
// recording
MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(path);
recorder.prepare();
recorder.start();
recorder.stop();
recorder.release();
// finished recording
// playing
MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource(path);
mediaPlayer.prepare(); // <- There it hangs
mediaPlayer.start();
Does anybody has any thoughts about it?
Thank you all in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---