# Get rid of audio resampling in Pulseaudio



## johnspack (Jun 14, 2021)

I always thought you could only set 2 sample rates in pulseaudio.  Nope.   First of all you want to set default to 44.1 so there is no resampling for regular flacs and cds.  Then set alternate to 48 to cover dvd quality.
Then set "avoid resampling" to true.  If you have a modern dac made in the last 5 years...  it will have auto resolution switching.  After setting this,  resampling method should be "copy" for everything from 44.1
to 192 and beyond.  If it must resample,  set to soxr-vhq.    Set "default-sample-format = s24le or s32le depending on what your dac can do.  Setting higher won't degrade performance.  This will give you the best
audio experience.  You need to edit  /etc/pulse/daemon.conf. 
resample-method = soxr-vhq
avoid-resampling = true
; enable-remixing = yes
; remixing-use-all-sink-channels = yes
; remixing-produce-lfe = no
; remixing-consume-lfe = no
; lfe-crossover-freq = 0

; flat-volumes = no

; rescue-streams = yes

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 200000

default-sample-format = s24le
default-sample-rate = 44100
alternate-sample-rate = 48000
; default-sample-channels = 2
; default-channel-map = front-left,front-right

You will need to restart pulse,  or reboot after this.

Also to get more control over your audio,  install PulseEffects.  It will show you in real time how your audio is being produced,  and you can apply many effects.


----------



## Ja.KooLit (Jun 27, 2021)

im not an expert but have you tried to use pipewire instead of pulseaudio?

*While its true that pipewire is not mature as pulseaudio but my system is sounding better with Pipewire. But I also have pulseeffects installed and uses some tweaks. And with helvum installed, you could have a visual routes on hows the processing done*


----------



## johnspack (Jun 28, 2021)

I am probably going to play with pipewire as it is included with 21.04,  but requires a bit more setup to fully install.  Should be able to switch between the 2 servers.  It should be more mature by
21.10 release....  maybe.


----------

