You are not logged in.

#1 2019-12-30 21:47:31

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 446

[SOLVED] Sample format - avoiding unnecessary resampling?

First of all I'm not an audiophile and surely not an audio expert, so please be gentle ;-)

So I've been playing around with sound settings and I was able to improve the quality of the sound - surely I hear the difference on my Sennheiser HD 4.50 BTNC Wireless headphones, especially when connected by the wire. Unfortunately there are still some things that bother me, and one of which is sample format.

After doing some reading and watching some video materials I understand the meaning of sample rate and bit depth when it comes to audio quality, but still I'm not sure how (if!) sample format affects it.

First, I made some tweaks to ~/.config/pulse/daemon.conf

# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
## more information. Default values are commented out.  Use either ; or # for
## commenting.

daemonize = no
; fail = yes
; allow-module-loading = yes
; allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; enable-memfd = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

high-priority = yes
nice-level = -11

realtime-scheduling = yes
realtime-priority = 9

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

resample-method = soxr-vhq
; avoid-resampling = false
; enable-remixing = yes
; remixing-use-all-sink-channels = yes
enable-lfe-remixing = no
; lfe-crossover-freq = 0

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

default-fragments = 2
default-fragment-size-msec = 125

; enable-deferred-volume = yes
; deferred-volume-safety-margin-usec = 8000
; deferred-volume-extra-delay-usec = 0

and /etc/asound.conf

# Use PulseAudio plugin hw
pcm.!default {
   type plug
   slave.pcm hw
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

# vim:set ft=alsaconf:

defaults.pcm.rate_converter "speexrate_best"

Those settings seem to work good on my Intel HD Audio (Cannon Lake PCH cAVS) sound card with Realtek ALC1220 codec and ESS Sabre Audio DAC (24bit/192kHz).

To make things better I installed and configured PulseEffects.

Now, when I play some music using Spotify Linux native client, PulseEffects shows:
1. Format: s16le - that's normal, according to this
2. Frequency: 44100Hz - also OK for this ervice
3. Channels: 2 - as configured in ~/.config/pulse/daemon.conf
4. Resampler - soxr-vhq - as configured in ~/.config/pulse/daemon.conf

At the top of the PulseEffects I see this

https://ibb.co/BcmypDn

So it seems that my "audio system" (let's call it that way) takes the original audio source from Spotify (described in detail above), then converts to float32le, 96kHz, then converts it to F32LE, 96kHz, then to s32le, 96kHz, before finally sends it to my headphones/audio output. So when I changed "default-sample-format" to "s32le" in ~/.config/pulse/daemon.conf, the conversion course described above changed to: source  -> s32le, 96kHz -> F32LE, 96kHz -> s32le -> output.
So I assume the signal goes this way: source -> driver/sound card -> ALSA -> Pulse Audio -> DAC -> output. Why I can't change all of the sample formats to s32le to avoid any unnecessary resampling?

It gets even more complicated - when I play the same FLAC 24bit/96kHz file in JuK and Deadbeef I'm getting different sample formats (float32le vs s24le)...

https://ibb.co/hZZSHvK

Am I missing something? Is it possible to unify sample format?

Last edited by Zibi1981 (2020-01-10 09:38:09)


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

#2 2019-12-30 23:07:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,394

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

Don't use pulseeffects if you don't want resamplings (you pretty much have to depending on effects you're using) to happen and set avoid-resampling = true . That will properly reopen the devices to not unnecessarily resample if not necessary. Afaik you cannot really avoid the sample format from changing (again depends on the effect and how fine granulared the samples they manipulate need to be) but it also shouldn't have a noticeable effect on the end result.

Generally if you check pacmd list-sink-inputs and the resampler mentioned is copy or null that means that pulse doesn't have to do a resampling pass.

Also the chain is normally, for pulse using applications: source -> pulseaudio -> kernel driver -> output (your asound.conf is only relevant for applications not having native pulse support (and you shouldn't need to set a resample method there the pulse pcm plugin will do the correct thing regardless))

The resamplling difference between applications could be that the applications themselves do a resampling pass on the input before passing it to pulse, i'd say deadbeef is likely to be more "vanilla" in that aspect.

In general if you don't notice anything horrifyingly broken or off to your ears I suggest you don't worry too hard about it.

Last edited by V1del (2019-12-30 23:15:57)

Offline

#3 2019-12-31 09:26:20

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 446

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

OK, so I disabled PulseEffects and when I play a FLAC 24bit/96kHz audio file I get this

1) when playing Deadbeef

$ pacmd list-sink-inputs
1 sink input(s) available.
    index: 2
        driver: <protocol-native.c>
        flags: 
        state: RUNNING
        sink: 0 <alsa_output.pci-0000_00_1f.3.analog-stereo>
        volume: front-left: 53739 /  82% / -5,17 dB,   front-right: 53739 /  82% / -5,17 dB
                balance 0,00
        muted: no
        current latency: 144,55 ms
        requested latency: 105,00 ms
        sample spec: s24le 2 k 96000 Hz
        channel map: front-left,front-right
                     Stereo
        resample method: copy
        module: 12
        client: 14 <Deadbeef>
        properties:
                media.name = "Music"
                application.name = "Deadbeef"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "33"
                application.process.id = "2218"
                application.process.user = "zbyszek"
                application.process.host = "titanlinux"
                application.process.binary = "deadbeef"
                application.language = "pl_PL.UTF-8"
                window.x11.display = ":0"
                application.process.machine_id = "e6356ef8461349318707a27e3626d5ed"
                application.process.session_id = "2"
                media.role = "music"
                application.icon_name = "deadbeef"
                module-stream-restore.id = "sink-input-by-media-role:music"

2) when playing JuK

$ pacmd list-sink-inputs
1 sink input(s) available.
    index: 4
        driver: <protocol-native.c>
        flags: START_CORKED FIX_RATE 
        state: RUNNING
        sink: 0 <alsa_output.pci-0000_00_1f.3.analog-stereo>
        volume: front-left: 53739 /  82% / -5,17 dB,   front-right: 53739 /  82% / -5,17 dB
                balance 0,00
        muted: no
        current latency: 1960,93 ms
        requested latency: 40,00 ms
        sample spec: float32le 2 k 96000 Hz
        channel map: front-left,front-right
                     Stereo
        resample method: copy
        module: 12
        client: 21 <juk>
        properties:
                media.role = "music"
                media.name = "audio stream"
                application.name = "juk"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "33"
                application.id = "org.kde.phonon.juk"
                application.version = "19.12.0"
                application.icon_name = "juk"
                application.language = "pl_PL.UTF-8"
                application.process.id = "2892"
                application.process.user = "zbyszek"
                application.process.host = "titanlinux"
                application.process.binary = "juk"
                window.x11.display = ":0"
                application.process.machine_id = "e6356ef8461349318707a27e3626d5ed"
                application.process.session_id = "2"
                module-stream-restore.id = "sink-input-by-media-role:music"

It seems Deadbeef is actually more "vanilla-like" audio player when compared to JuK, as FLAC (if I'm not mistaken) supports only integer samples up to 24 bits, but JuK seems to use floating point 32 bit format.
Correct me if I'm wrong, but it seems some players (like JuK) perform unnecessary resampling, but what for? As I mentioned I'm not an audiophile, but it seems to me JuK method sounds little better - is it possible? The problem with JuK is, there is some sort of delay and jitter at the start of almost every track.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

#4 2019-12-31 12:12:28

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,394

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

Juk uses phonon and thus will pass the audio to gstreamer or vlc (depending on the backend chosen, seeing fixed rate and the like I'm assuming VLC) and they could be doing some changing here for how they want to process the audio (and as a matter of fact, yes VLC will internally switch whatever input to f32le). in general going from s24le to f32le is transparent and shouldn't result in any changing of the input signal.

The stutter you are hearing is likely due to the astronomical latency that is being used here, which I don't know off hand as to why that happens, but that is indeed a VLC thing. (and I suggest you try with the gstreamer as opposed to the VLC phonon backend, it's generally more featured)

Last edited by V1del (2019-12-31 12:22:38)

Offline

#5 2020-01-02 19:40:09

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 446

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

I changed the backend to gstreamer using phononsettings. Will give it a try if there is any hearable stutter. What do you mean be "astronomical latency"?


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

#6 2020-01-02 19:52:19

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 206

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

Zibi1981 wrote:

What do you mean be "astronomical latency"?

Is an english idiomatic expression that means essentially "a very large amount" -- so a very large amount of latency.


"the wind-blown way, wanna win? don't play"

Offline

#7 2020-01-02 21:04:39

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 446

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

Yeah, I know that, but what is the cut off value for "astronomical" in this instance?


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

#8 2020-01-02 21:13:39

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 206

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

v1del may answer that, not sure and haven't been following this thread closely, just knew(assumed) you weren't a native english speaker so was trying to be helpful. Apologies for the noise. Cheers.


"the wind-blown way, wanna win? don't play"

Offline

#9 2020-01-03 15:35:22

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,394

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

        current latency: 1960,93 ms
        requested latency: 40,00 ms

That's two full seconds between what's sent out of JuK till it reaches your speakers. As it's just music it probably isn't going to be that noticable, but when the buffer suddenly has to update due to song change/pause/stop events it will take two seconds between that action and the actual relevant auditory change.

Offline

#10 2020-01-05 06:24:31

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 446

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

Any idea what could be the reason for that?


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

#11 2020-01-05 12:19:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,394

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

As mentioned I don't really know, but VLC in general seems to be quite susceptible to this, one would probably have to dig into it's implementation here. This should be better with the gstreamer backend for phonon using (KDE) applications.

Offline

#12 2020-01-06 21:09:11

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 446

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

Look at latency now...

pacmd list-sink-inputs
2 sink input(s) available.
    index: 2
        driver: <protocol-native.c>
        flags: START_CORKED 
        state: RUNNING
        sink: 3 <bluez_sink.00_16_94_23_65_06.a2dp_sink>
        volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        muted: no
        current latency: 78,17 ms
        requested latency: 43,58 ms
        sample spec: float32le 2 k 96000 Hz
        channel map: front-left,front-right
                     Stereo
        resample method: soxr-vhq
        module: 12
        client: 13 <PulseEffects>
        properties:
                application.id = "com.github.wwmm.pulseeffects.sinkinputs"
                media.name = "Playback Stream"
                application.name = "PulseEffects"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "33"
                application.icon_name = "pulseeffects"
                application.process.id = "1581"
                application.process.user = "zbyszek"
                application.process.host = "titanlinux"
                application.process.binary = "pulseeffects"
                application.language = "pl_PL.UTF-8"
                window.x11.display = ":0"
                application.process.machine_id = "e6356ef8461349318707a27e3626d5ed"
                application.process.session_id = "2"
                module-stream-restore.id = "sink-input-by-application-id:com.github.wwmm.pulseeffects.sinkinputs"
    index: 32
        driver: <protocol-native.c>
        flags: START_CORKED 
        state: RUNNING
        sink: 1 <PulseEffects_apps>
        volume: front-left: 52428 /  80% / -5,81 dB,   front-right: 52428 /  80% / -5,81 dB
                balance 0,00
        muted: no
        current latency: 44,00 ms
        requested latency: 21,33 ms
        sample spec: float32le 2 k 96000 Hz
        channel map: front-left,front-right
                     Stereo
        resample method: (null)
        module: 12
        client: 52 <Opera>
        properties:
                application.icon_name = "chromium-browser"
                media.name = "Playback"
                application.name = "Opera"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "33"
                application.process.id = "11007"
                application.process.user = "zbyszek"
                application.process.host = "titanlinux"
                application.process.binary = "opera"
                application.language = "pl_PL.UTF-8"
                window.x11.display = ":0"
                application.process.machine_id = "e6356ef8461349318707a27e3626d5ed"
                application.process.session_id = "2"
                module-stream-restore.id = "sink-input-by-application-name:Opera"

I'm not sure if this is due to GStreamer or not, but it seems a lot better. Unfortunatelly sound when playing JuK or Deadbeaf is totally broken.

Last edited by Zibi1981 (2020-01-06 21:13:50)


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

#13 2020-01-06 21:32:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,394

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

What does "totally broken" mean?  Phonon settings have no relation to deadbeef so whatever you did doesn't have any relation here. Do you have all relevant gstreamer codecs installed? Phonon settings only affect KDE applications.

I'm also not sure what exactly you are asking right now. Is your original question sufficiently answered? Again chucking pulseeffects inbetween and wanting unnecessary resampling avoided are contradictory end goals. Either one or the other, do what sounds better to you.

Last edited by V1del (2020-01-06 21:37:11)

Offline

#14 2020-01-06 21:48:30

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 446

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

I hear only crackling when playing any track with JuK, Deadbeef oraz Clementine, but the sound seems normal on VLC, Audacity, Opera and Spotify app.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

#15 2020-01-06 22:01:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,394

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

Well yes and now? That's just a random set of packages does not using pulseeffects work? If yes fix your pulseeffects settings if not post the output with an actual "broken" application open.

Offline

#16 2020-01-06 22:24:22

Thorsten Reinbold
Member
From: Germany
Registered: 2011-12-06
Posts: 346

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

Regarding HQ audio, I strongly advise you to read the following article:

24/192 Music Downloads ...and why they make no sense

Offline

#17 2020-01-06 22:57:22

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 446

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

V1del wrote:

Well yes and now? That's just a random set of packages does not using pulseeffects work? If yes fix your pulseeffects settings if not post the output with an actual "broken" application open.

I'm sorry, but I don't understand. Do you want me to post the output of pacmd list-sink-inputs? Here you are - playing with Clementine, sound is crackling a lot, almost no melody is hearable

pacmd list-sink-inputs
2 sink input(s) available.
    index: 2
        driver: <protocol-native.c>
        flags: START_CORKED 
        state: RUNNING
        sink: 0 <alsa_output.pci-0000_00_1f.3.analog-stereo>
        volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        muted: no
        current latency: 56,51 ms
        requested latency: 90,00 ms
        sample spec: float32le 2 k 96000 Hz
        channel map: front-left,front-right
                     Stereo
        resample method: copy
        module: 12
        client: 13 <PulseEffects>
        properties:
                application.id = "com.github.wwmm.pulseeffects.sinkinputs"
                media.name = "Playback Stream"
                application.name = "PulseEffects"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "33"
                application.icon_name = "pulseeffects"
                application.process.id = "1602"
                application.process.user = "zbyszek"
                application.process.host = "titanlinux"
                application.process.binary = "pulseeffects"
                application.language = "pl_PL.UTF-8"
                window.x11.display = ":0"
                application.process.machine_id = "e6356ef8461349318707a27e3626d5ed"
                application.process.session_id = "2"
                module-stream-restore.id = "sink-input-by-application-id:com.github.wwmm.pulseeffects.sinkinputs"
    index: 4
        driver: <protocol-native.c>
        flags: START_CORKED 
        state: RUNNING
        sink: 1 <PulseEffects_apps>
        volume: front-left: 1374420992 / 2097200% / 259,30 dB,   front-right: 1374420992 / 2097200% / 259,30 dB
                balance 0,00
        muted: no
        current latency: 110,00 ms
        requested latency: 50,00 ms
        sample spec: s16le 2 k 96000 Hz
        channel map: front-left,front-right
                     Stereo
        resample method: copy
        module: 12
        client: 18 <Clementine>
        properties:
                media.name = "'Bach: Little Fugue in G minor, BWV578' autorstwa 'David Goode'"
                application.name = "Clementine"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "33"
                media.role = "music"
                application.process.id = "2284"
                application.process.user = "zbyszek"
                application.process.host = "titanlinux"
                application.process.binary = "clementine"
                application.language = "pl_PL.UTF-8"
                window.x11.display = ":0"
                application.process.machine_id = "e6356ef8461349318707a27e3626d5ed"
                application.process.session_id = "2"
                application.icon_name = "clementine"
                module-stream-restore.id = "sink-input-by-media-role:music"
                media.title = "Bach: Little Fugue in G minor, BWV578 "
                media.artist = "David Goode"
Thorsten Reinbold wrote:

Regarding HQ audio, I strongly advise you to read the following article:

24/192 Music Downloads ...and why they make no sense

Yeah, I did that, more or less, but that's not the only opinion.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

#18 2020-01-06 23:42:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,394

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

Your volume is at a bajillion, fix your pulse effects/clementine setup, actually look at the numbers you are getting in the GUI, maybe don't use pulseffects, or take the time to actually check what you are setting.

pactl set-sink-input-volume 4 100%,100%

Regarding that link, it is an opinion (and as shown largely scientific fact) by a person that happens to have quite big of a clue about how all of this works, you should heed it if you have any interest in "avoiding unnecessary resampling". (But from how this is going so far it doesn't look like you are very interested in that - which is fine - but then you have to live with the fact that resampling will happen and playing with pulseeffects will be largely trial and error, which I can't really help you with, you have to figure this stuff so that you get the setup you want, for yourself)

Last edited by V1del (2020-01-06 23:47:47)

Offline

#19 2020-01-07 08:53:30

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 446

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

$ LC_ALL=C pactl set-sink-input-volume 4 100%,100%
Invalid volume specification

"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

#20 2020-01-07 09:26:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,394

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

The sink index will change if you've closed clementine in the meantime double check that, you can also set this in pavucontrol  or so if interpreting these commands and their outputs is difficult for you, just double check in pavucontrol.

Offline

#21 2020-01-07 21:28:38

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 446

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

Yeah, I managed to lower down the volume using pavucontrol. This was the reason for crappy sound in some apps. Thanks!
Just wondering why it affected only some audio players, not all.

Back to the main topic.

I would like to understand how sample format works - is it a set of rules on how to encode audio file, and when the file is encoded it's unchangeable or can be re-coded to a different sample format but only with loss in quality? Which one is considered best/optimal? Some say "floating point" is better than "signed".


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

#22 2020-01-07 22:59:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,394

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

floating point gives you more space and more nuance and smaller steps (and thus you can technically store more information), signed saves you space (for storage) but if properly done can be done without losing any actually audible information (i.e. read the linked article again). This is mostly relevant if you are actively producing music and know what you want to do with it. If you just listening, the choice will usually already have been done for you. And at that point you either want to prevent resampling from happening (because you want the unaltered "as-intended" experience), or you feel like "enhancing" and then what is being used here is up to the needs of whatever "enhancer" you use.

This isn't a yes or no, better or worse,  it depends on what you are actually doing here and for which needs.

Last edited by V1del (2020-01-07 23:01:26)

Offline

#23 2020-01-10 09:36:51

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 446

Re: [SOLVED] Sample format - avoiding unnecessary resampling?

Thanks for explanation. I will mark this topic closed.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

Board footer

Powered by FluxBB