我正在使用 Ubuntu 12.04 机器。我已经从源代码(姜饼版本 2.3.6)构建了 android,并尝试了模拟器。但它无法打开音频输出。
音频调试结果如下:
myself@mycomp:~/my-android$ out/host/linux-x86/bin/emulator -debug audio
emulator: WARNING: system partition size adjusted to match image file (70 MB > 66 MB)
emulator: qpa_audio_init: entering
emulator: could not find libpulse on this system
emulator: qpa_audio_init: exiting
audio: Could not init `pa' audio driver
emulator: qesd_audio_init: entering
emulator: could not find libesd on this system
audio: Could not init `esd' audio driver
audio: Could not init `alsa' audio driver
emulator: qpa_audio_init: entering
emulator: could not find libpulse on this system
emulator: qpa_audio_init: exiting
audio: Could not init `pa' audio driver
emulator: qesd_audio_init: entering
emulator: could not find libesd on this system
audio: Could not init `esd' audio driver
audio: Could not init `alsa' audio driver
oss: Could not initialize DAC
oss: Failed to open `/dev/dsp'
oss: Reason: No such file or directory
oss: Could not initialize DAC
oss: Failed to open `/dev/dsp'
oss: Reason: No such file or directory
audio: Failed to create voice `goldfish_audio'
emulator: warning: opening audio output failed
我看到 pulseaudio 正在运行:
myself@mycomp:~/my-android$ ps aux | grep pulse
myself 2015 0.0 0.0 415940 5972 ? S<l 09:26 0:00 /usr/bin/pulseaudio --start --log-target=syslog
myself 7402 0.0 0.0 9380 932 pts/5 S+ 11:44 0:00 grep --color=auto pulse
我在 /usr/lib/ 下还有一些 libpulse 库:
myself@mycomp:/usr/lib$ find . -name "libpulse*"
./x86_64-linux-gnu/libpulse-simple.so.0.0.3
./x86_64-linux-gnu/libpulse-mainloop-glib.so.0.0.4
./x86_64-linux-gnu/libpulsecommon-1.1.so
./x86_64-linux-gnu/libpulse.so.0.13.5
./x86_64-linux-gnu/libpulse.so.0
./x86_64-linux-gnu/libpulse-mainloop-glib.so.0
./x86_64-linux-gnu/libpulse-simple.so.0
./x86_64-linux-gnu/libpulsedsp.so
./jvm/java-6-openjdk-amd64/jre/lib/amd64/libpulse-java.so
./libpulsecore-1.1.so
我在网上搜索了该问题的解决方案,但找不到任何为我工作的人。
提前致谢,