From: Jörg Krause Date: Mon, 9 May 2016 13:07:21 +0000 (+0200) Subject: Fix vol2attn X-Git-Tag: 2.8.3.6~4^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F294%2Fhead;p=thirdparty%2Fshairport-sync.git Fix vol2attn This fixes calculation of the scaled attenuation if `max_dB` is different from zero. Closes: https://github.com/mikebrady/shairport-sync/issues/290 --- diff --git a/common.c b/common.c index a86fd8e2..6ca577e9 100644 --- a/common.c +++ b/common.c @@ -437,7 +437,7 @@ double vol2attn(double vol, long max_db, long min_db) { #define order 3 - double vol_setting = max_db; + double vol_setting = 0; if ((vol <= 0.0) && (vol >= -30.0)) { long range_db = max_db - min_db; // this will be a positive nunmber