Sound Problems/zh-cn: Difference between revisions

From KDE UserBase Wiki
m (Created page with "常见的问题有 * 你不能播放声音,因为你正在使用一个程序试着访问声卡设备/dev/dsp,但是这个设备已经被另外一个程序占用了。 * 你...")
(Updating to match new version of source page)
 
(24 intermediate revisions by 3 users not shown)
Line 9: Line 9:
* 不同的程序用不同的设备播放声音。
* 不同的程序用不同的设备播放声音。


Solutions:
解决办法:
There is no silver bullet solving all your sound problems. The solution depends on the application you use to play sound. As an example, you can use mplayer with ALSA and OSS. For more info, see mplayer's documentation by calling
没有什么高招可以解决你所有的音效问题。解决办法依赖于你用来播放声音的程序。举个例子,你可以用mplayer+ALSA或mplayer+OSS。要了解更多信息,用如下命令查阅mplayer的文档。
 
{{Input|1= mplayer -ao help}}
{{Input|1= mplayer -ao help}}


Here are some specific issues that you may meet.
这里有些你可能会遇到的特殊问题。


===KDE 4 uses the wrong sound device.===
===KDE4使用错误的音效设备===


That is not an error, but a configuration issue. To tell KDE 4 which soundcard to use (or prefer if available), open <menuchoice>System Settings</menuchoice> and go to <menuchoice>Multimedia</menuchoice> in the <menuchoice>General</menuchoice> tab.
这不是一个错误(error),而是一个设置问题。打开<menuchoice>系统设置</menuchoice><menuchoice>常规</menuchoice>标签页里的<menuchoice>多媒体</menuchoice>告诉KDE 4可用的声卡(或偏好的如果有的话)。


===Devices from /etc/asound.conf or ~/.asoundrc are not listed.===
=== /etc/asound.conf或~/.asoundrc未列出设备===


[[Special:myLanguage/Glossary#Phonon|Phonon]] uses a function introduced in ALSA 1.0.14 to find those devices. To make this function list your entry you need to add a name hint. E.g.
[[Special:myLanguage/Glossary#Phonon|Phonon]] 使用ALSA 1.0.14引入的功能找到这些设备。为了使用这一功能您需要在列表添加一个名字暗示。例如:


{{Input|1= hint {
{{Input|1= hint {
Line 29: Line 30:
}}
}}


Here is a complete example that adds a new volume control named Phonon to your mixer:
一个完整的例子,增加了一个名为Phonon to your mixer的新的音量控制:


{{Input|1= pcm.softvolPhonon {
{{Input|1= pcm.softvolPhonon {
Line 48: Line 49:
}}
}}


===After an update, PulseAudio gives you very low volume===
===更新后,PulseAudio 的音量非常低===
 
PulseAudio 有个叫 'normaliser' 功能会导致这种情况。关闭它, 在 /etc/pulse/daemon.conf 中设定 flat-volumes = no
 
=== Low maximum volume with PulseAudio on KDE or pavucontrol shows more than 100% of volume, but KMix goes only up to 100% ===
 
Entering the following command


PulseAudio has a 'normaliser' function which can cause this.  To turn it off, set flat-volumes = no in /etc/pulse/daemon.conf
{{Input|1=kwriteconfig -file kmixrc -group Global -key VolumeOverdrive -type bool true}}


{{KDE3}}
and restart [[Special:myLanguage/KMix|KMix]], '''KMix''' goes to 153% of volume .
 
This is the same of edit <tt>$HOME/.kde/share/config/kmixrc</tt> and add:
 
{{Input|1=[Global]
    VolumeOverdrive=true
}}
 
References: {{Bug|297959}}, {{Bug|309597}}, [https://bugzilla.redhat.com/show_bug.cgi?id=704839 RHB#704839].
 
===  Can't mute event (system) sounds and other KMix strange problems ===
 
When '''KMix''' show strange bars, etc. or events sound bar doesn't work .
 
Now with KDE 4.10+, '''PulseAudio''' is enabled by user session and we can check that with the following command
 
{{Input|1=<nowiki>ps -ef |</nowiki> grep pulseau}}
 
Example of output:
 
{{Output|1=sergio    1880    1  0 12:15 ?        00:04:01 /usr/bin/pulseaudio --start --log-target=syslog}}
 
Entering the following commands
 
{{Input|1=killall kmix
rm -rf .pulse/
rm -rf .pulse-cookie
rm -rf .config/pulse/
kmix}}
 
fixed this issue. Old configurations of '''PulseAudio''', can make this issue, if we create a new user, we won't have this issue .
 
{{KDE3/tla}}
 
<span class="mw-translate-fuzzy">
{{KDE3/tla}}
===You are using KDE 3 and you keep losing sound.  Sometimes it works, sometimes it doesn't.===
===You are using KDE 3 and you keep losing sound.  Sometimes it works, sometimes it doesn't.===
</span>


KDE 3.x uses the '''aRts''' sound system.  In earlier versions there were a number of problems, but in recent years the only problem remaining seems to be that '''aRts''' hangs on to the sound system when it has finished with it.  To cure this, use <menuchoice>kcontrol -> Sound & Multimedia</menuchoice>.  Towards the bottom of the <menuchoice>General</menuchoice> tab there is a setting for <menuchoice>Auto-suspend if idle after:</menuchoice>  Set this to 1 second.
KDE 3.x uses the '''aRts''' sound system.  In earlier versions there were a number of problems, but in recent years the only problem remaining seems to be that '''aRts''' hangs on to the sound system when it has finished with it.  To cure this, use <menuchoice>kcontrol -> Sound & Multimedia</menuchoice>.  Towards the bottom of the <menuchoice>General</menuchoice> tab there is a setting for <menuchoice>Auto-suspend if idle after:</menuchoice>  Set this to 1 second.


===You have multimedia keys but KDE doesn't recognise them===
===你有多媒体键,但 KDE 不能识别 ===


[http://www.lingnu.com/en/howto/58-kdevolume.html This link] has a clear description of what one user did to make his Volume-up and Volume-down keys work.
[http://www.lingnu.com/en/howto/58-kdevolume.html This link] has a clear description of what one user did to make his Volume-up and Volume-down keys work.
Line 65: Line 108:
Try replacing your sound card.  If you still don't hear sound, check out [https://help.ubuntu.com/community/OpenSound this Ubuntu Community page]
Try replacing your sound card.  If you still don't hear sound, check out [https://help.ubuntu.com/community/OpenSound this Ubuntu Community page]


[[Category:System]]
===外置声卡===
[[Category:Multimedia]]
 
参见 [[Special:myLanguage/Sound_Problems/External_Sound_Cards|外置声卡]]
 
[[Category:系统/zh-cn]]
[[Category:多媒体/zh-cn]]

Latest revision as of 06:00, 14 January 2014

理解音效

为了理解KDE的音效,你必须了解Linux声音系统(这个章节假定你是在Linux上跑KDE)。有两种类型的声音系统运行在Linux上: ALSAOSS。两者都提供他们自己的声卡驱动。ALSA只能在Linux上用,OSS可以在多种UNIX系统上用。ALSA允许多个程序同时访问声卡,OSS 不行。OSS提供一个设备来输出声音。这个设备在一个时间只能被一个程序访问。为了减少混乱,ALSA模拟了OSS,也提供一个设备作为声卡的接口。通常 ALSA和OSS一样将声卡的设备命名为/dev/dsp。在某些发行版中用的 PulseAudio,提供了上述那些之上的另一层(layer)。它的任务是处理多个音频流,以便,举个例子,你可以在听音乐的同时接受到消息通知。

常见的问题有

  • 你不能播放声音,因为你正在使用一个程序试着访问声卡设备/dev/dsp,但是这个设备已经被另外一个程序占用了。
  • 你不能使用全系统设置用的混音器kmix来调节使用声卡设备/dev/dsp的某一个程序的音量。
  • 不同的程序用不同的设备播放声音。

解决办法: 没有什么高招可以解决你所有的音效问题。解决办法依赖于你用来播放声音的程序。举个例子,你可以用mplayer+ALSA或mplayer+OSS。要了解更多信息,用如下命令查阅mplayer的文档。

mplayer -ao help

这里有些你可能会遇到的特殊问题。

KDE4使用错误的音效设备

这不是一个错误(error),而是一个设置问题。打开系统设置常规标签页里的多媒体告诉KDE 4可用的声卡(或偏好的如果有的话)。

/etc/asound.conf或~/.asoundrc未列出设备

Phonon 使用ALSA 1.0.14引入的功能找到这些设备。为了使用这一功能您需要在列表添加一个名字暗示。例如:

hint {
     show on
     description "Name to display for the device"
 }

一个完整的例子,增加了一个名为Phonon to your mixer的新的音量控制:

pcm.softvolPhonon {
     type softvol
     slave.pcm "default:CARD=0"
     control {
         name "Phonon"
         card 0
     }
     min_dB -51.0
     max_dB 0.0
     resolution 100
     hint {
         show on
         description "My Soundcard with extra Volume Control"
     }
 }

更新后,PulseAudio 的音量非常低

PulseAudio 有个叫 'normaliser' 功能会导致这种情况。关闭它, 在 /etc/pulse/daemon.conf 中设定 flat-volumes = no

Low maximum volume with PulseAudio on KDE or pavucontrol shows more than 100% of volume, but KMix goes only up to 100%

Entering the following command

kwriteconfig -file kmixrc -group Global -key VolumeOverdrive -type bool true

and restart KMix, KMix goes to 153% of volume .

This is the same of edit $HOME/.kde/share/config/kmixrc and add:

[Global] 
    VolumeOverdrive=true

References: bug #297959, bug #309597, RHB#704839.

Can't mute event (system) sounds and other KMix strange problems

When KMix show strange bars, etc. or events sound bar doesn't work .

Now with KDE 4.10+, PulseAudio is enabled by user session and we can check that with the following command

ps -ef | grep pulseau

Example of output:

sergio    1880     1  0 12:15 ?        00:04:01 /usr/bin/pulseaudio --start --log-target=syslog

Entering the following commands

killall kmix
rm -rf .pulse/
rm -rf .pulse-cookie 
rm -rf .config/pulse/
kmix

fixed this issue. Old configurations of PulseAudio, can make this issue, if we create a new user, we won't have this issue .


You are using KDE 3 and you keep losing sound. Sometimes it works, sometimes it doesn't.

KDE 3.x uses the aRts sound system. In earlier versions there were a number of problems, but in recent years the only problem remaining seems to be that aRts hangs on to the sound system when it has finished with it. To cure this, use kcontrol -> Sound & Multimedia. Towards the bottom of the General tab there is a setting for Auto-suspend if idle after: Set this to 1 second.

你有多媒体键,但 KDE 不能识别

This link has a clear description of what one user did to make his Volume-up and Volume-down keys work.

You tried all of the above but it still doesn't work (Ubuntu variants only)

Try replacing your sound card. If you still don't hear sound, check out this Ubuntu Community page

外置声卡

参见 外置声卡