summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/interface.c b/src/interface.c
index 4ac1a0f..771127b 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -9,7 +9,6 @@
#include "sink.h"
#include "pa-sink-ctl.h"
-#define VOLUME_MAX UINT16_MAX
#define VOLUME_BAR_LEN 50
#define WIDTH 80
#define HEIGHT 10
@@ -188,9 +187,8 @@ void get_input(void)
};
} else
break;
-
int input_vol = tmp.tmp_vol + 2 * volume_mult * (VOLUME_MAX / 100);
- tmp.tmp_vol = CLAMP(input_vol, 0, VOLUME_MAX); /* force input_vol in [0, VOL_MAX] */
+ tmp.tmp_vol = CLAMP(input_vol, VOLUME_MIN, VOLUME_MAX); /* force input_vol in [0, VOL_NORM] */
for (int i = 0; i < tmp.volume.channels; ++i)
tmp.volume.values[i] = tmp.tmp_vol;