Thanks, I will. I would have already, but don't have a device with me
at the moment. Also, when I last played with audio recording -- which
admittedly was some time ago -- I recall it did work on an AVD.

Matthew Fleming

On Sep 13, 10:58 am, Michael Banzon <mich...@banzon.dk> wrote:
> I would try it on a device. The emulator usually makes audio handeling a
> pain (for me) and generally doesn't work (for me).
>
>
>
>
>
>
>
>
>
> On Tuesday, September 13, 2011, Matthew Fleming <mgf...@gmail.com> wrote:
> > Hi,
>
> > I have the following ridiculously simple code which for some reason is
> > not working:
>
> > recorder = new MediaRecorder();
> > recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
> > recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
> > recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
> > recorder.setOutputFile(audioFile.getAbsolutePath());
> > recorder.prepare();
> > recorder.start();
>
> > It fails with a runtime exception at recorder.start() with the message
> > "start failed". Very informative. I have verified that the audioFile
> > points to something reasonable (/data/data/com.dermvision.vfuAndroid/
> > files/audio.m4a) and that this file gets created, though with 0
> > length. I have used basically the same code in the past without
> > problems. I have tried running on 2.2 and 3.2 emulators with the same
> > result. The computer running the emulator has working audio hardware.
> > I have not yet tried running on an Android device. The application has
> > RECORD_AUDIO permissions.
>
> > Any ideas would be greatly appreciated -- this is really getting
> > annoying.
>
> > Thank very much,
>
> > Matthew Fleming
> > DermVision
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Michael Banzonhttp://michaelbanzon.com/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to