summaryrefslogtreecommitdiffstats
path: root/src/pulse/volume.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse/volume.c')
-rw-r--r--src/pulse/volume.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index 3688b847..33ab1c5f 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -80,10 +80,10 @@ pa_volume_t pa_sw_volume_multiply(pa_volume_t a, pa_volume_t b) {
return pa_sw_volume_from_linear(pa_sw_volume_to_linear(a)* pa_sw_volume_to_linear(b));
}
-#define USER_DECIBEL_RANGE 30
+#define USER_DECIBEL_RANGE 60
pa_volume_t pa_sw_volume_from_dB(double dB) {
- if (dB <= -USER_DECIBEL_RANGE)
+ if (isinf(dB) < 0 || dB <= -USER_DECIBEL_RANGE)
return PA_VOLUME_MUTED;
return (pa_volume_t) ((dB/USER_DECIBEL_RANGE+1)*PA_VOLUME_NORM);