• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

For those who worry about quality of software volume control

OP
B

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
I would need to measure with REW to attenuate precisely by 12dB and I can't do that right now, but as I said, it is not that what worries me.
It seems to me you're avoiding my question about distortion.
If the test passed, there will be no distortion, and therefore explanation is not needed.
What volume unit the XU208 use? Can you post a screenshot?
 

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,065
Location
Zg, Cro
If the test passed, there will be no distortion, and therefore explanation is not needed.
What volume unit the XU208 use? Can you post a screenshot?

Aha, I see.

It's not about XU208, it's about the Volumio player that controls XU208. It's scale is from 0-100.

Capture.JPG
 

danadam

Addicted to Fun and Learning
Joined
Jan 20, 2017
Messages
957
Likes
1,497
I think for starters you can check if you can you reduce the volume to the point this file does not clip.

AFAICT that mp3 file was prepared in such way that decoding produces samples that go over 1.0 (in float) or max_int (in integers). So if your audio chain is using floats from decoding until volume change then you can recover non-clipped version when you reduce the volume enough. On the other hand, if your audio chain converts floats to integers at any point before volume change, the result will always be clipped.
 

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,065
Location
Zg, Cro
I think for starters you can check if you can you reduce the volume to the point this file does not clip.

AFAICT that mp3 file was prepared in such way that decoding produces samples that go over 1.0 (in float) or max_int (in integers). So if your audio chain is using floats from decoding until volume change then you can recover non-clipped version when you reduce the volume enough. On the other hand, if your audio chain converts floats to integers at any point before volume change, the result will always be clipped.

With Volumio I cannot, a.mp3 clips on all volume levels, no matter if I use "software" or "hardware" volume control.
I also tried to play it on HEOS soundbar which is also UPnP renderer as Volumio and there it also clips on all volume levels.

I tried to play a.mp3 locally on my notebook with MusicBee player and there it doesn't clip on any volume (or it clips so it is much harder to hear it).
I also tried the same with Foobar v2000 (v1.4.4) and it also doesn't clip.

I forwarded these findings to Volumio developer so hopefully he can fix it.

P.S. I tried to play a.mp3 with Audacity and I got clipped (distorted) sound as with Volumio and HEOS.
 
Last edited:

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,682
Likes
2,962
Oh, I didn't realize that the D10 had a volume chip in it. Anyone know how to configure Squeezelite to control this?
Assuming you've got a recent enough version of Squeezelite you can use the -V command line option to specify which volume control to use. Run 'squeezelite -h' to see if it supports the -V option.
 

Daverz

Major Contributor
Joined
Mar 17, 2019
Messages
1,294
Likes
1,451
Assuming you've got a recent enough version of Squeezelite you can use the -V command line option to specify which volume control to use. Run 'squeezelite -h' to see if it supports the -V option.
D10 doesn't have a dedicated volume control chip, but as most DAC chips can control volume so can most of the USB interface chips and XU208 (used in D10) can do it. Some players can access this feature, some can't. For the ones that can look at the player volume control settings for a feature called "hardware volume control" or something similar.

Thanks. Found it on the piCorePlayer "Diagnostics" page for my RPi which lists "D10" as the available "Squeezelite volume controls". I assume it's being used since I specified "-V D10" and squeezelite starts OK, whereas it does not start if I misspell the name.
 

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,065
Location
Zg, Cro
I think for starters you can check if you can you reduce the volume to the point this file does not clip.

AFAICT that mp3 file was prepared in such way that decoding produces samples that go over 1.0 (in float) or max_int (in integers). So if your audio chain is using floats from decoding until volume change then you can recover non-clipped version when you reduce the volume enough. On the other hand, if your audio chain converts floats to integers at any point before volume change, the result will always be clipped.

Volumio uses ALSA library to access XU208 hardware volume control and software volume control in Volumio obviously doesn't work the same way as in foobar and in MusicBee, but would it make any difference if there was no clipping?
 
OP
B

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
Volumio uses ALSA library to access XU208 hardware volume control and software volume control in Volumio obviously doesn't work the same way as in foobar and in MusicBee, but would it make any difference if there was no clipping?
I think you can search for "Realize that even if we don't use any DSP features" in my article in Archimago's blog, and read until the end.
BTW, here is an interactive demo showing how floating point really works:
https://evanw.github.io/float-toy/
Integer has another name called "fixed-point".
 

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,065
Location
Zg, Cro
I think you can search for "Realize that even if we don't use any DSP features" in my article in Archimago's blog, and read until the end.
BTW, here is an interactive demo showing how floating point really works:
https://evanw.github.io/float-toy/
Integer has another name called "fixed-point".

Sure, thank you. So, is it correct to conclude that foobar and MusicBee are using 64 bit float arithmetics to calculate volume level values?
 

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,065
Location
Zg, Cro
It is fixed point. ESS didn't lie, just a misunderstanding.

I see. So foobar does a better job with software volume control than ESS as it is using 32 bit float while ESS is using 32 bit integer (fixed point)?
 
Top Bottom