How to enable audio recording in Android emulator?

In the documentation of MediaRecorder you can see that:

Note: Currently, MediaRecorder does not work on the emulator.

Even in the last API.

But I saw that in the class AudioRecord, there is no note for this.
More then that, I have found this code:

AudioRecord recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,
        8000, AudioFormat.CHANNEL_CONFIGURATION_MONO,
        AudioFormat.ENCODING_PCM_16BIT, 500000);
recorder.startRecording();

From here. And the code's author said that this code works in the emulator.

Tags:

Android