文章若未特別註明,皆採用 知识共享许可协议 請自覺遵守






這主要是一篇翻譯,原帖在 https://www.linuxquestions.org/questions/linux-newbie-8/sound-quality-in-linux-610168/



he is not satisfied with the quality of sound in Linux(fedora7).

他對Linux (fedora 7)下的聲音質量不滿意。

All of u try this : play the same song simultaneously on a linux &
windows machine, u will notice difference in sound quality.


While looking at the sound settings, he found that Fedora uses generic
ALSA sound drivers. He think that the quality is not good because the
drivers are generic, they are not specific.


下面數個樓層(1#到15#)主要話題是這麼幾個:“根據我的經驗來說並沒有什麼不同”;“在兩臺不一樣的機子上比較的結論並沒有什麼意義”;“認爲不同的請去做無偏見測試(blind test)然後再來說”;“‘聲音質量’是個很模糊的術語,請詳細描述”。






I totally agree with you on what you've said. There is no difference.


To make clear once and for all, people should keep in mind we're talking about **digital signals** here, processed in a lossless (PCM) manner. If there are no resamplings or any other effects applied to the PCM stream, any OS is pretty much the same!


It works just like this:


*You open the application that will play your songs.


*The application uses the appropriate demuxer (to deal with .mp3, .wma, .ogg, .m4a... extensions) to get the encoded stream (wma, mp3, aac, flac, ogg...).


*Then there is a decoder that will convert back the encoded stream into a PCM stream [the application could, then, make use of some DSPs to resample or up / downmix by itself].

然後這裏有個解碼器,它會將編碼好的流轉換回PCM流[應用程序可以——在此之後——使用一些數字信號處理技術(DSP)來自己進行重採樣或是up / downmix]。

*The PCM stream, most likely to be untouched by the application, is sent to your sound system.


Now, when it comes to the PCM stream and the sound system, things are just like this:


*If you have a sound server, like Pulse Audio, the PCM stream is sent to the Pulse server. Pulse up / downsamples the PCM stream if it is different of its own settings (you can change Pulse default sampling rate by editing the "/etc/pulse/daemon.conf" file, it also up / downmixes the PCM file if its told to,

如果你有一個音頻服務器(sound server)——如Pulse Audio——該PCM流會被送到Pulse服務器。Pulse會對該PCM流進行向上/向下採樣(up  /downsample)——如果它和Pulse自己的設置不同的話(你可以通過編輯/etc/pulse/daemon.conf文件來修改Pulse的默認採樣率,它也可以在被告知如此做時up / downmix該PCM文件)。

*and, at last, the processed (or maybe untouched) PCM stream is sent to ALSA system.


I'm not going to get into deeper details on how things work under Windows or OS X, for example, because things are almost the same with all of them. The point is: the **true** maximum audio quality is achieved but getting the PCM stream untouched to the sound card. That ANY operating system can do, including Linux.

我不打算深入如Windows或OS X中事情如何工作的細節,因爲事情在它們中幾乎是一樣的。重點在於:真正的最大聲音質量由(原文中是but,疑似by之訛誤)傳輸未碰觸的PCM流至聲卡中來達成。這是任何操作系統都可以做到的,包括Linux。

ALSA is able to do the resampling stuff on its own, but it's not as configurable as Pulse Audio. I myself like to set Pulse to 44,1 KHz sampling and S32_LE resolution all the time, except when I have to deal with 48 KHz audio samplings. I know for sure my sound card works only at 48, 96 or 192 KHz on Linux, but its audio processor (X-Fi) has an excellent resampler using advanced techniques. So, I prefer to always let the sound card to the processing.

ALSA可以自己進行重採樣工作,但沒有Pulse Audio那麼好的可配置性。我個人喜歡始終設置Pulse爲44.1KHz採樣率以及S32_LE分辨率(resolution)——除非當我需要處理48KHz音頻採樣時。我很確定我的聲卡在Linux下僅可以工作於48、96或192KHz,但它的音頻處理器(X-Fi)有極好的使用高級技術的重採樣器。所以,我傾向於始終讓聲卡自己來處理。

If you don't have such hardware capabilities, I guess you'd really want to consider taking a look at this website.


Up and downmixing on Linux, anyway, is flat and 2 dimensional as I've said. I've already tried ALSA "vdownmix" plugin, it works but it's not yet as well implemented as Creative's own HRTF technology.

在Linux中,Up 及 downmixing始終是平(flat)的以及2維的——就像我說過的那樣{參見14#}。我已經試過ALSA “vdownmix”插件——它可以工作,但是尚未有創新自己的HRTF技術那樣實現完備。

Amarok has a built in equalizer that does its job, specially when set to "Rock" if I'm not wrong. aTunes also has its own equalizer but it sounds horrible and is not worth a try.


So, quality is the same on every OS if you know how to set them up. Here I've left the tips of mine to help anyone who would occasionally be interested.


> Preferably, don't do any resamplings.

> 最好不要做任何重採樣。
> Tell Pulse and / or ALSA to always use the highest definition for your sound card (mine is 24 bit, so I use the S32_LE instruction both under Pulse and ALSA).

> 告訴Pulse和/或ALSA總是使用你聲卡的最高精確度(我的是24位,所以我在Pulse和ALSA下均使用S32_LE指令)。
> Avoid multichannel if all you have is a pair of speakers or headphones, or try the not so well implemented "vdownmix" plugin for ALSA.

> 如果你僅有一對揚聲器(speaker)或者耳機(headphone),避免多聲道,或者使用ALSA中尚未完善的vdownmix插件。
> Try Amarok equalizer (probabily set to "Rock") to help improve a bit the perceived sound quality.

> 嘗試Amarok均衡器(很可能是設置爲“搖滾(Rock)”)以幫助增強一點感知到的聲音質量。

Best wishes to everyone here and to Linux in the hope that it continues to improve and to be a more and more appealing alternative to MS Windows or Apple OS X.

致祝願於這裏所有人,以及給Linux——期望它可以繼續改進並且成爲一個愈來愈吸引人的MS Windows或Apple OS X替代選擇。


I don't know precisely what problem you guys are talking about, anyway, I want to leave here the comment of mine on this subject.


I own a Creative SoundBlaster X-Fi XtremeMusic. On Windows, Creative's drivers offer you technologies fully implemented in hardware like Crystalizer and CMSS-3D.

我有一個創新的聲霸卡X-Fi XtremeMusic。在Windows上,創新的驅動提供了全部由硬件完成的技術,如Crystalizer和CMSS-3D。

Crystalizer stands for a really dynamic equalizer which adjusts itself according to the quality of the sound the card is fed with. For example: if I'm playing a 96kbps MP3 file, with considerable loss of high frequencies, the card is able to play with its own equalizer, the one specifically called Crystalizer, so you can kind of restore the lost frequencies (that's the illusion you have).


CMSS-3D stands for a multi purpose surround sound mixer. For example: if you have a 5.1 home theater speakers setup and want to play a stereo sound, the CMSS-3D technology is able to identify instruments on the sound the card is fed with and dynamically distribute it through all the available speakers. It's a totally active design, that's why I say "dynamically". If on the other hand, all you have is a pair of speakers or headphones, the card is able to mix into stereo channels up to 8 surround sound channels with Creative's proprietary HRTF technology. It immerses you into your DVD / BD movies or 3D games.


That could all be implemented on Linux for sure IF there was any sort of interest from Creative's Linux driver people. Anyone knows for sure it'll never happen anymore, thus, we're left with a complete 2D and raw sound experience with Linux or any other OS except Windows with Creative's sound cards.


I often test new Linux distributions but can never stay with anyone of them because of the lack of such important technologies. I have 3 headsets, high fidelity ones (12 to 28 KHz frequency range and near 20 bit sound quality), and I very frequently watch 5.1 CH videos and play 5.1 CH games. I just couldn't live without CMSS-3D. Besides that, X-Fi Crystalizer is just so amazing I have no pleasure on listening to anything without it.

我經常測試新的Linux發行版,然而無法在其中任一上停留——因爲缺乏如此重要的技術。我有3個耳機(headset)——高保真的(12到28KHz的頻域以及接近20位的聲音質量)——並且我時常看5.1聲道影片和玩5.1聲道遊戲。我簡直無法離開CMSS-3D。另外,X-Fi Crystalizer也是那麼的令人驚奇以至於我在離開它聽任何東西時都覺得索然無味。

Linux, OS X and Windows do have almost no difference in sound quality. Up to XP, with such a good card as the X-Fi, Windows was the best out of the three. Having them all properly set up not to make any sort of resamplings, they're all the same. Each, of course, deal with latency a different way. I'm not quite familiar with other OS'es but at least Windows has WASAPI and works admirably with ASIO 2.0 and OpenAL (hardware accelerated, opposed to software rendered on Linux and OS X). These APIs are quite good on latency, specially ASIO. Anyway, without resampling and not taking into consideration latency, any OS should be the same.

Linux、OS X和Windows在聲音質量上真的幾乎沒有什麼區別。直到XP,在使用如此好的X-Fi卡片時,Windows是它們三個中表現最好的。把它們都設置好且不使用任何重採樣(resampling)之後,它們(的表現)都是完全一樣的。當然了,它們使用不同的方法對待延遲(latency)。我並不特別熟悉其他的操作系統,但是至少Windows有WASAPI並且在使用ASIO 2.0和OpenAL(硬件加速,和Linux及OS X上的軟件渲染相反)時表現極好。這些API在延遲上表現良好,尤其是ASIO。(當然)無論怎麼說,在不使用重採樣並且不考慮延遲時,任何操作系統的表現都應當是一樣的。

Now, when it comes to improvements implemented in hardware / driver, no doubt Windows wins (on Creative's side, specifically).


I'll just keep using Linux once in a while with its 100% software rendered, mixed, resampled audio, quite flat and 2 dimensional.


For the best quality and user experience and full use of my hardware capabilities, I'll unfortunately have to stay with Windows.


By the way, have any of you ever realized that Linux just doesn't grow on the "hardware accelerated" industry? The most it gets is OpenGL. There are no solutions to fully decode in hardware video streams, like MPEG2 or H.264, or to mix audio streams from different sources, or to process MIDI, or EAX effects, or audio resempling, downmixing, or TCP offload, or whatever. Everything, except OpenGL is software implemented. I shame indeed!

順便說一下,你們是否意識到Linux並不長在”硬件加速“的產業上?它得到得最多是OpenGL。沒有任何的硬件解碼視頻流——例如MPEG2或者H.264——,或者合併不同源頭的音頻流,或者處理MIDI,或者EAX效果,或者音頻重採樣、downmixing,或者TCP offload,或者其他東西的方案。任何東西——除了OpenGL——都是軟件實現的。我實在感到恥辱。


Well, that is of course the whole issue. Most hardware manufacturers put all their efforts into developing drivers for Windows. Linux, if it is even considered at all, is an afterthought at best. The companies that fully support linux and open source their drivers (for example Ralink wireless cards) have hardware that works just as well in linux as it does in Windows.


For those who swear that sound is "better" in Windows, perhaps try a blind comparison. Install Windows and linux on the same computer. Have a friend boot either Windows or linux randomly and play some music. See if you can consistently tell whether Windows or linux is playing the music. You may be surprised at what you find. Even the (supposedly golden eared) high end audio reviewers at Stereophile magazine dare not do blind comparisons of audio hardware.

對於那些信誓旦旦說在Windows中聲音“更好”的人,你們應當嘗試一下無偏見比較(blind comparison)。在同一臺電腦上安裝Windows和Linux。讓一個朋友隨意啓動Windows或Linux並且播放同一首音樂。看看你能否始終如一地分辨出播放音樂的到底是Windows還是Linux。你或許會對你自己的發現感到驚訝。即使是那些Stereophile雜誌中(號稱金耳的)高端音頻評測者也不敢對音頻硬件做無偏見比較。



The "problem" you talk about exists on Windows too. We're actually talking about a Dolby Digital issue. It's not exactly a problem though, nothing that has got to be fixed. Dolby Digital has a lower audio range, output, volume, whatever they call it, meaning it sounds lower than other formats, like DTS (which happens to be better concerning audio quality).

你所說的這個“問題”在Windows上其實也有。我們在討論的其實是Dolby Digital的事情。它其實並不是個問題,所以也沒什麼可修復的。Dolby Digital有一個更小的聲音範圍/輸出/音量——不管怎麼叫它吧——,意味着在和其他格式——例如DTS(考慮到聲音品質時它恰好更好)——比較時它聽起來聲音更低。

Windows 7, for example, has a built-in Dolby Digital decoder. If you right-click the video screen (on Media Player) and go to "Enhancements" (I'm not sure that's what it's like on the English version of the software since I use the Br-Portuguese version) you can click "Dolby Digital settings" and it will give you three options for you to choose: "Normal", "Night" and "Cinema". If you choose "Normal" you're going to have a boost on low volumes and a decrease on the excessively high ones. If you choose "Night", you'll have the same softened output but a slight increase on the dialogs (I guess this one sounds better for onboard sound solutions). Now, if you choose "Cinema" mode, then you'll have the same exact output that the DVD was intended to have, called full dynamic. At times the sound will be low, and at times high, it'll vary dynamically. Most people won't like it if they don't have a good sound card, capable of high dynamics in audio, and a good speaker system or headphones too.

Windows 7——例子而已——有一個內建的Dolby Digital解碼器。如果你在視頻界面上右鍵(在Media Player中{即Windows Media Player,Windows自帶的播放器})並且轉到“增強(Enhancements)”(我不確定在英文版中它到底叫什麼,因爲我用的是巴西葡萄牙文(Br-Portuguese)版),這樣你可以點擊“Dolby Digital設置(Dolby Digital settings)”,然後它會給你三個可選項:“正常(Normal)”、“夜間(Night)”、“影院(Cinema)”。如果你選擇“正常”,你會在低音量時得到增強且在高音量時減弱;如果你選擇“夜間”,你會得到相同的柔化了的(softened)輸出但在對話中得到輕微增強(我猜這會在板載(onboard)聲音解決方案{集成聲卡?}中聽起來更好一些);現在,如果你選擇“影院”模式,你會得到同該DVD被預期得到的效果完全一樣的輸出——這被稱爲全動態(full dynamics)。有時聲音會低,有時會高——它會動態變化。多數人並不喜歡它,因爲(if)他們沒有一塊好聲卡——適用於音頻中的高動態——以及好的揚聲器(speaker)系統或耳機(headphone)。

I don't know which Dolby Digital decoder you've chosen under Windows XP, since it doesn't have a built-in one, I'd recommend, by the way, AC3Filter, it's one of the bests out there. Anyway, it seems your decoder under Windows is set to something like the "Night" mode, giving you pretty much the same (high enough) volume experience throughout the whole video.

我不知道你在Windows XP中選的是哪個Dolby Digital解碼器,因爲它沒有內建的——順便一提,我建議AC3Filter,它是上佳之選中的一個。不管怎麼說吧,看起來你在Windows所用的解碼器被設置爲類似於“夜間”模式——給你在看整個視頻時以還原很好(pretty much the same)(足夠高)的聲音體驗。

Linux, on the other hand, doesn't have the same configurability of Windows 7 and other decoders like AC3Filter, and instead of choosing the "Night" mode equivalent as does your Windows XP decoder, it chooses the "Cinema" mode for quality purposes. As I've said, preferably, the encoded, compressed sound should be decoded and sent to your audio system **untouched**. If you have your system sound output set to stereo there is surely some processing done with the decoded DVD audio in order to fit it to 2CH outputs. Anyway, the Linux decoder tries to convert the compressed audio stream to PCM **as it is**, with the same output volume as is in the DVD. As said, too, Dolby Digital has lower volume if compared to other compression formats, like DTS, MP3, etc.. Thus, you have the impression that Linux sounds worse, which isn't true. Actually, it sounds better since it doesn't play with audio volume.

然而另一方面,Linux沒有如同Windows 7或者其他解碼器如AC3Filter之列的配置能力,並且它沒有像你的Windows XP解碼器那樣選擇“夜間”模式的等價物,而是出於質量考慮選擇“影院”模式。像我說過的那樣,較好情況下,該編碼、壓縮了的聲音應當被解碼並且原封不動地送往聲音系統。如果你將你系統的聲音輸出設置爲立體聲,其中顯然會有一些處理過程施加在解碼後的DVD音頻上——爲了使其適用於雙聲道(2CH)輸出。不管怎麼說吧,Linux解碼器會試着將壓縮過的聲音無差別地(as it is)轉換到PCM——同DVD中一模一樣的輸出音量。依然如前所述,Dolby Digital和其他格式——如DTS、MP3等——比起來音量更低。因此,你產生Linux聲音更差的感覺——其實並不正確。實際上,它聽起來更好,因爲它沒有調戲(play with)音量。

I don't know any solution to this but trying to increase both the PCM and Master volumes under ALSA Mixer (type on terminal "alsamix").

我並不知道該事情的解決方案——除了在ALSA Mixer(在終端中輸入“alsamix”{至少現在arch上應當爲alsamixer})中嘗試調高PCM和Master的音量。

I myself can't stand watching DVD's or any multichannel audio under Linux. Firstly because it has no advanced audio downmixing with well implemented HRTF techniques, as Creative's CMSS-3D. Secondly, it has no hardware accelerated MPEG-2 decoding. There are good [paid] choices for Windows out there, but for Linux the best you're gonna have is VLC which has plenty of choices for deinterlacing. Anyway, none of them have come even near to the quality of my hardware dedicated decoding under Windows. My ATI Radeon HD 3850 deinterlaces using vector adaptive algorithm with "pulldown" detection, that makes my DVD's look gorgeous! Let alone if I had a better card, like the 4000 series, with upscaling techniques!!! I like most Linux Mint and Ubuntu. I have made extensive tests with Mint 10 RC and Ubuntu 10.10. I can say that Totem DVD player, or Gnome Mplayer look just like Apple's DVD player on Mac OS X. Sound for me is not an issue on DVD's because of my better sound card.

我自己無法忍受在Linux下播放任何DVD或是多聲道音頻。首先,因爲它沒有任何使用實現良好的HRTF技術——例如創新的CMSS-3D——的高級音頻downmixing。其次,它沒有硬件加速的MPEG-2解碼。Windows上有許多良好的[付費]選擇,但是在Linux上你能得到的最好一種應當是VLC——它擁有大量的deinterlacing選擇。不管怎麼說,它們中沒有任何一個表現得哪怕是接近我在Windows下的硬件專用解碼。我的ATI Radeon HD 3850 deinterlaces使用帶有“pulldown”檢測的vector adaptive算法,它能讓我的DVD看起來絢爛奪目!更不用說假如我有一個更好的卡片——例如4000系列——擁有upscaling技術會如何了!我最喜歡Linux Mint和Ubuntu。我對Mint 10 RC和Ubuntu 10.10進行了多方面的測試。我可以說Totem DVD播放器或者Gnome Mplayer看起來就像Mac OS X上蘋果的DVD播放器一樣。歸功於我良好的聲卡,DVD的聲音對我來說並不是個問題。