diff options
author | ben <benjaminfranzke@googlemail.com> | 2010-07-15 11:07:51 +0200 |
---|---|---|
committer | ben <benjaminfranzke@googlemail.com> | 2010-07-15 11:07:51 +0200 |
commit | b9357271148229d36c42b59508c89940bbbcd708 (patch) | |
tree | c5adf259c2472978936a2cf5745b60bc7a245611 /src/interface.c | |
parent | e084dd44550567aaf5e67a3128a16a4cd59ea744 (diff) | |
download | pa-sink-ctl-b9357271148229d36c42b59508c89940bbbcd708.tar.gz pa-sink-ctl-b9357271148229d36c42b59508c89940bbbcd708.tar.bz2 pa-sink-ctl-b9357271148229d36c42b59508c89940bbbcd708.zip |
replace own VOLUME_MAX def with PA_VOLUME_NORM def
Diffstat (limited to 'src/interface.c')
-rw-r--r-- | src/interface.c | 4 |
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; |