Docs
Linux distros come with something called "Pulse Audio" which is something designed to mimic the kernel sound mixers in Windows and MacOS. Trouble is, of course, it has mediocre settings when installed, perverting everything to 44/16.

The main point of Pulse Audio is that it acts as a mixer/resampler on top of ALSA drivers, so any programme playing sound to Pulse Audio can have it converted to the soundcard's supported format and several programmes can be playing sound at a time.

Anyway here's what to do: Edit as root the file /etc/pulse/daemon.conf first.



Set the following parameters:

default-sample-format=s32le (could be s24le or float, this is usually s16le methinks).
default-sample-rate=192000 or the highest your soundcard/interface supports (this can be 96000 or 48000 for most older soundcards). 96000 Hz is easier on the CPU but doesn't sound as good.
alternate-sample-rate=96000 - this allows using a different sampling frequency if the primary frequency fails for some reason. Typically this is not used.
resample-rate=src-sinc-best-quality - this is Secret Rabbit Code/Libsamplerate resampler at highest quality. Still not as good as Ota-chan's plugin for Winamp but good enough.
avoid-resampling=false - this can be set to true to make certain applications play with their native sample rates when they are outside the preferred rates.
enable-remixing=yes - this enables mixing up/down to the number of channels set for output according to channel mapping scheme too (see the end of config file).

Now kill and restart the Pulse Audio demon by issuing:

pulseaudio --kill pulseaudio --start

If the config is valid it ought to work, otherwise changing sampling rates and sample bit format is needed. Also restart any mixers that might be hogging Pulse Audio (sometimes they lock the sampling rate).



Then run cat /proc/asound/card0/pcm0p/sub0/hw_param to show the actual sampling rate and BPS. This should be edited to e. g. /card1/ for an external sound interface.
All of this will also allow Pulse to play 192/24 and 96/24 files at their real resolution, not cold plastic lifeless 44/16. Of course players like Audacious can output directly to ALSA at the played files' resolution, but say VLC benefits a lot from resampling to 192/32, making everything that much warmer and more natural-sounding when playing video files with crummy AC3 soundtracks. And the silly thing doesn't have a sampling rate setting due to some idiot discriminating developer (it used to be there in VLC 1).

You have no rights to post comments