Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"emulator: warning: opening audio input failed" displayed in the console while AVD is launching

"emulator: warning: opening audio input failed"

The above message is displayed in the console everytime an AVD is launching, and then no sound is coming out from the emulator.

I have tried to delete the AVD and have created a new one again and again, but it didn't help with the problem.

I have also searched on Google for many time, but I find nothing useful.

It is really interesting that people tend to suggest to just ignore the problem because the AVD is still working fine without sound.

But I am writing an Android App that related to sound, I really need a workable solution to make the AVD to "speak" again.

Many thanks to you.

like image 763
user1556811 Avatar asked Jul 27 '12 06:07

user1556811


3 Answers

you can disable audio input setting manually : go to your-avd-path/config.ini then change the line hw.audioInput=yes to hw.audioInput=no

like image 97
Anybug Avatar answered Oct 22 '22 14:10

Anybug


Open the AVD Manager.Click edit on any existing Virtual Device created or create a new one. On the create Virtual device Window, there is a new button on hardware tab.When that button is clicked, u will get a number of properties. Select the necessary property (like Audio Playback Support). I think that will do the trick.

EDIT: This was possible in earlier versions of AVD Manager. Android updated the AVD to a new one(that we see now). There is no option to enable/disable audio/video in the new AVD creation window and there is no word of it in the AVD documentation.

However they specify that you can play audio and video using Emulator.

AVDs let you define certain hardware aspects of your emulated phone and allow you to create many configurations to test many Android platforms and hardware permutations. Once your application is running on the emulator, it can use the services of the Android platform to invoke other applications, access the network, play audio and video, store and retrieve data, notify the user, and render graphical transitions and themes.

like image 34
Renjith Avatar answered Oct 22 '22 15:10

Renjith


The way I solved my issue: Make sure you do not have anything else "using" or diverting your audio driver.

In my instance I also work with audio devices for music applications. This one in particular was "Jack Audio". So I disabled the Jack Audio server and my audio device came back.

like image 1
Fanny Darmer Avatar answered Oct 22 '22 15:10

Fanny Darmer