summaryrefslogtreecommitdiffstats
path: root/converter.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter.c')
-rw-r--r--converter.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/converter.c b/converter.c
index f439b77..b33aafc 100644
--- a/converter.c
+++ b/converter.c
@@ -684,7 +684,7 @@ do_interleave:
return SA_SUCCESS;
}
-void converter_set_volume(converter_t *c, const int vol[]) {
+void converter_set_volume(converter_t *c, const int32_t vol[]) {
unsigned i;
int no_volume = 1;
@@ -696,6 +696,10 @@ void converter_set_volume(converter_t *c, const int vol[]) {
if (vol[i] == 0) {
c->volume_factor[i] = 1;
c->volume_divisor[1] = 1;
+ } else if (vol[i] <= SA_VOLUME_MUTED) {
+ c->volume_factor[i] = 0;
+ c->volume_divisor[1] = 1;
+ no_volume = 0;
} else {
float f = powf(10.0, (float) vol[i] / 2000);