I think emulator is ok for developing. One thing you need to pay attention for using AudioRecord is: you'd better use AudioRecord.getMinBufferSize() * X to set up the buffer size, otherwise it may not always work properly. I'm not sure that can resolve your problem, hope it helps.
On Apr 12, 1:47 pm, Olivier Guilyardi <l...@samalyse.com> wrote: > Hi, > > I can successfully create an AudioRecord instance on the emulator, on Android > 1.5, 1.6, and 2.0 with the following statement : > > new AudioRecord( > MediaRecorder.AudioSource.MIC, > 8000, > AudioFormat.CHANNEL_CONFIGURATION_MONO, > AudioFormat.ENCODING_PCM_16BIT, > 16384); > > But it fails on an emulator running Android 2.1, with the following error: > > ERROR/AudioRecord(299): Could not get audio input for record source 1 > ERROR/AudioRecord-JNI(299): Error creating AudioRecord instance: > initialization > check failed. > ERROR/AudioRecord-Java(299): [ android.media.AudioRecord ] Error code -20 when > initializing native AudioRecord object. > > For information, AudioRecord.getMinBufferSize() returns 640 bytes. > > I've played with all constructor arguments, it didn't help... > > I'm running the SDK Tools revision 5 on Linux. > > Any clue? > > -- > Olivier -- 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 To unsubscribe, reply using "remove me" as the subject.