From f230e3e543507cc7e11a90967ecb116097601845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Krause?= Date: Mon, 9 May 2016 15:07:21 +0200 Subject: [PATCH] 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 --- common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.c b/common.c index a86fd8e20..6ca577e93 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