Patrick Dixon Wrote: 
> Steinar, I have just had the Rolling Stones around for tea - so I think
> your patch is good!  Thank you very much.  Can you tell me what the
> perl-speak is for -35 <= $dB < 0 and I will run with that.

The below patch does that.

Steinar


Index: server/Slim/Player/Squeezebox2.pm
===================================================================
--- server/Slim/Player/Squeezebox2.pm   (revision 4942)
+++ 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 >= -35 && $db <= 0) {
+        return int($floatmult * (1 << 8) + 0.5) * (1 << 8);
+    }
+    else {
+        return int(($floatmult * (1 << 16)) + 0.5);
+    }
}

sub volume {


-- 
sbjaerum
_______________________________________________
audiophiles mailing list
audiophiles@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/audiophiles

Reply via email to