dean Wrote: 
> I'm not entirely sure I understand the problem well enough to say  
> that this patch is correct.
> 
> (I realize that there has been some listening tests done and you like 
> 
> it better, but I want to also make sure it's correct.)
> 
> Given that the Squeezebox has a 24 bit output, the rounding error  
> should be down at around at 138-144dB, not 90-96dB and I have a hard  
> time believing that the effect would be as obvious as you state at  
> that level.

I am not sure how audible the difference is, but in my opinion it is
"cleaner" to multiply with gain coefficients that does not lead to bits
being lost because of rounding.

I suggest to modify the gain coefficients for volume settings from
-30dB to 0dB so that the patch becomes:


Index: server/Slim/Player/Squeezebox2.pm
===================================================================
--- server/Slim/Player/Squeezebox2.pm   (revision 5190)
+++ server/Slim/Player/Squeezebox2.pm   (working copy)
@@ -272,7 +272,12 @@
# Map a floating point dB value to a 16.16 fixed point value
to
# send as a new style volume to SB2 (FW 22+).
my $floatmult = 10 ** ($db/20);
-       return int(($floatmult * (1 << 16)) + 0.5);
+       if ($db >= -30 && $db <= 0) {
+               return int($floatmult * (1 << 8) + 0.5) * (1 << 8);
+       }
+       else {
+               return int(($floatmult * (1 << 16)) + 0.5);
+       }
}

sub volume {


With this patch the differences between "trunk" gain and "patch" gain
are listed below.
The differences are small, but again, I think the patch gain
coefficients are "cleaner".
In my opinion, it can't hurt to use the patch gain.
The purists will be satisfied if it is applied...

Steinar


dB       Trunk       Patch
0       65536       65536
-1       58409       58368
-2       52057       51968
-3       46396       46336
-4       41350       41472
-5       36854       36864
-6       32846       32768
-7       29274       29184
-8       26090       26112
-9       23253       23296
-10       20724       20736
-11       18471       18432
-12       16462       16384
-13       14672       14592
-14       13076       13056
-15       11654       11776
-16       10387       10496
-17        9257        9216
-18        8250        8192
-19        7353        7424
-20        6554        6656
-21        5841        5888
-22        5206        5120
-23        4640        4608
-24        4135        4096
-25        3685        3584
-26        3285        3328
-27        2927        2816
-28        2609        2560
-29        2325        2304
-30        2072        2048
-31        1847        1847
-32        1646        1646
-33        1467        1467
-34        1308        1308
-35        1165        1165
-36        1039        1039
-37         926         926
-38         825         825
-39         735         735
-40         655         655
-41         584         584
-42         521         521
-43         464         464
-44         414         414
-45         369         369
-46         328         328
-47         293         293
-48         261         261
-49         233         233
-50         207         207


-- 
sbjaerum
------------------------------------------------------------------------
sbjaerum's Profile: http://forums.slimdevices.com/member.php?userid=237
View this thread: http://forums.slimdevices.com/showthread.php?t=17269

_______________________________________________
audiophiles mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/audiophiles

Reply via email to