Unable to get any sound from Android SDK emulator launched from eclipse

I'm starting to develop for Android, and I'm using Eclipse with the Android plugin and Android SDK.

No matter what I do, I can not get the emulator to make a sound.

I tried to enable audio in the virtual device setup.

I also tried various command lines in the launch configuration, such as:

  • -audio oss ==== an error message appears that the oss backend is not defined.
  • -useaudio === appears as an invalid option
  • -audion -winaudio === starts without error, but the sound is still

If I open my Windows7 audio controller on my laptop, I see that the Android virtual machine has its own volume slider, but nothing sounds when I move or click on this audio slider. (Other volume sliders produce a normal beep.)

I searched for “Android emulator without sound” for several hours, but no luck.

Any ideas?

+5
source share
1 answer

The problem was not that the emulator wasn’t making sound (which is confirmed by the fact that it wouldn’t work on my device as well), but as an unaccounted problem with the SoundPool class.

logcat " 1 ". , , , , ( ).

playSound, soundPool.play(...). , 0, (.. " 1 " ).

, , , soundPool.play(...) call 0, sleep for 1 , . , .

SDK, Android 2.2 Android 2.3.1, Android 2.2 - , , Sprint LG optimus S LS670.

Android 2.2 Android 2.3.1 Virtual device.

Android 2.2 VD, 10 15 ( 10 15 ), sounspool .

Android 2.3.1 VD, , 350 , - 35 !

, Android 2.2, .

+2

All Articles