]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Fix vol2attn 294/head
authorJörg Krause <joerg.krause@embedded.rocks>
Mon, 9 May 2016 13:07:21 +0000 (15:07 +0200)
committerJörg Krause <joerg.krause@embedded.rocks>
Mon, 9 May 2016 13:10:37 +0000 (15:10 +0200)
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

index a86fd8e205b06f11ff27f621071b598d37f434de..6ca577e93f5bebcea10bcaf2feeebbe3fff5b7bb 100644 (file)
--- 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