Can the Android Emulator Record and Play Back Audio Using Pc Hardware

Can Android Emulator pick up audio?

From the android dev site: "The platform also lets you record audio and video, where supported by the mobile device hardware. To record audio or video, use the MediaRecorder class. Note that the emulator doesn't have hardware to capture audio or video, but actual mobile devices are likely to provide these capabilities, accessible through the MediaRecorder class. "

EDIT: It may actually be possible to record audio through the emulator. See this question: Can the Android emulator record and play back audio using pc hardware?

Can Android Emulator pick up audio?

From the android dev site: "The platform also lets you record audio and video, where supported by the mobile device hardware. To record audio or video, use the MediaRecorder class. Note that the emulator doesn't have hardware to capture audio or video, but actual mobile devices are likely to provide these capabilities, accessible through the MediaRecorder class. "

EDIT: It may actually be possible to record audio through the emulator. See this question: Can the Android emulator record and play back audio using pc hardware?

Android emulator audio input capturing

Yes, it is possible. All it needs just to start recording using AudioRecord (or whatever), but in some cases (depended on system image used in emulator) recording could be performed only in 8000 samples per second.

For example, when I'm using Lollipop images for emulator, it is possible to record on declared rate (44100), although it sounding like if it resampled. When using Kitkat or lower images, it is only possible to record ad 8000sps.

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.

Can not use MediaRecorder on Android Emulator. Is the storage location wrong?

Try and see if it works for Android 4.0. I know I had some issues with the camera in the emulator, in lower version (Lower than 4.0) it just wouldn't recognize my laptop webcam. But when I tried it on 4.0, when the AVD was loading a popup message came and asked me if I want to connect the webcam to the AVD, and once I agreed it worked.

Another poster in SO asked this question too, about the camera, and changing the AVD version to 4.0 did help him.

Maybe its the same for audio recording too, as both are external hardware for the typical PC.



Related Topics



Leave a reply



Submit