Sound Problems/zh-tw

From KDE Wiki Sandbox
This page is a translated version of the page Sound Problems and the translation is 38% complete.

理解音效

為了理解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

這裡有些你可能會遇到的特殊問題。

KDE 4使用錯誤的音效裝置

這不是一個錯誤(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.

You have multimedia keys but KDE doesn't recognise them

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

You want to use an External Sound Card

See the External Sound Card page