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 [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
To unsubscribe, reply using "remove me" as the subject.