Pure OS Audio quality

I have some 96k 32 bit audio files I listen to, in Windows I can get it to send all 96k through the toslink cable I have connected to my amp but in PureOS all the apps seem to downgrade it to 44.1k. Youtube via the browser can send 48k. Is there a way of hacking PureOS to send the full 96k data?

Edit file /etc/pulse/daemon.conf to change this line:

; avoid-resampling = false

to

avoid-resampling = true

and restart session.

(Notice that the leading ; was removed.)

3 Likes

Thanks for that, how do I open the file with the necessary privileges?

sudo vi /etc/pulse/daemon.conf

That command opened the file up int the terminal but i was unable to understand how to edit it. so i reopened the file and got a message telling me there was an edited swap file version or something. If I restart will i break something?

The message may have been:

Swap file ".daemon.conf.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:

Sorry. I assumed you knew how to use vi.

The low tech way of editing a protected file is e.g.

cd
sudo cp /etc/pulse/daemon.conf .
edit the file in your home directory using the text editor of your choice, any text editor
sudo cp daemon.conf /etc/pulse

Probably you haven’t changed anything and so it will be safe to restart.

When playing around with things, it’s not a bad idea to make a copy of the original file anyway. That way, if things go pear-shaped, you can more easily restore the file to its former state.

1 Like

Type sudo nano /etc/pulse/daemon.conf

then using the arrow keys locate the line in question. Make the changes as indicated. When you are done, hit Ctrl + O, confirm that you want to over write the file (thus saving it). Then hit Ctrl + X.

You are now free to restart pulse audio, but you can also just restart the machine.

4 Likes

So the last tip has helped me edit the file but its still sending it to the hifi at 44.1k instead of 96k.

here is what my file reads like:
; avoid-resampling = true
; enable-remixing = yes
; remixing-use-all-sink-channels = yes
; enable-lfe-remixing = no
; lfe-crossover-freq = 0

; flat-volumes = 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 = s16le
; default-sample-rate = 44100
; alternate-sample-rate = 96000

I also tried removing the semi colon at the start of the line but that didnt work either.

Is it because of the default sample format being limited to 16 bits and my flac file is 32 bits?

You must remove the semi-colon.

Please do that and restart the phone and then try again.

sudo nano /etc/pulse/daemon.conf is the file-name you need to edit and write-out to disk

the ; or ;; or # are commented out lines that need to be un-commented out to take effect.

simply erase the comments so the line looks like so :

avoid-resampling = true

make sure there are no spaces or anything else before or after the edited line.

i’ve learned something new in this thread too ! all input appreciated ! :partying_face:

1 Like

Thanks for that, however its still sending it at 44.1k. here is how it reads:

; resample-method = speex-float-1
avoid-resampling = true
; enable-remixing = yes
; remixing-use-all-sink-channels = yes
; enable-lfe-remixing = no
; lfe-crossover-freq = 0

; flat-volumes = 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 = s16le
; default-sample-rate = 44100
; alternate-sample-rate = 96000
; default-sample-channels = 2
; default-channel-map = front-left,front-right

could it be the resample method?

It shouldn’t be as resampling is what is downgrading your audio files. With avoid-resampling set to true, the resample method shouldn’t matter. Although avoid doesn’t read as implicit, so there may be another condition still permitting the resampling. Not my forte unfortunately.

Nor mine unfortunately. Back to @mladen ?

What hardware is this? laptop? phone?

Its a desktop PC. Intel i7 ivybridge

OK, for some reason I thought it was the Librem 5 (phone), I guess because I have been playing around with sound files on my phone.

Do you have actual audio files saved locally on the computer?

Did you restart after that change?

how can you tell ? what program are you using for playback ?
in my case the L-Mini-v1 is sending the original-digital-audio-output to an external AMP/DAC which does some internal processing on it’s own hardware and spits it further out ANALOG into my ears …

Yeah its on one of the internal HDDs’

I restarted twice. The details within the file have changed.

My amp has a screen on it that gives me details of whats playing etc. In windows I can play the same file and the screen reads 96k (after some faffing about) but when i switch it to PureOS its back to 44.1k. Im sending the music to the amp via an optical toslink cable, if that matters.

i mean, 44.1 kHz is original CD quality (it’s actually double the frequency most people can distinguish sound - we aren’t all bats you know :wink: )

if you’re into BASS then you need to be concerned about the lower frequency spectrum. i still think this warrants further investigation.

see the older thread > Audiophile question