很久以前ubuntu上装ldoce5,装上之后发现没声音,在win7上装就有声音。没搜到解决办法也就没管了。后来改用OpenSUSE,装上ldoce5发现也没有声音。OpenSUSE上还出现很多视频播放器都没有声音的问题,mplayer系列的播放器都放不出声音,只有realplayer和VLC有声音。
这次又在Ubuntu上装ldoce5,也没声音,本来不报任何希望的搜了一下,结果找到了解决办法。在这里mark一下。
第一,安装alsa-oss包(sudo apt-get install alsa-oss)。
第二,以"aoss /XX/ldoce5" 命令启动longman dictionnary,可以发声了。
问题原因分析: 应该是声卡驱动支持方面的问题。linux下声卡驱动主要是ALSA(Advance Linux Sound Architecture)和OSS(Open Sound System)两种。
下面是alsa-oss包的功能简介:
This package contains a program loader, aoss, which wraps applications written for OSS in a compatibility library, thus allowing them to work with ALSA.
There are two ways of getting an application to work with ALSA if the application was written for OSS. The first way is to load the special ALSA drivers that emulate the OSS kernel interface; these allow the application to open /dev/dsp0 and other OSS device files. The second way is to wrap the application in the libaoss library provided in this package; the wrapper causes the application to access native ALSA device files such as /dev/snd/pcmC0D0c instead of OSS device files.
Use of the alsa-oss library is recommended over the use of OSS-emulation drivers if you want to use ALSA's PCM plugin layer.
ALSA is the Advanced Linux Sound Architecture.
OSS is the free version of the Open Sound System.
总的来说,这个包的功能就是让一个基于OSS驱动的程序能运行在ALSA驱动上。