From 737cf2e69e0248e134979cbeb9230e71c908a53d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 13 May 2007 10:36:53 +0000 Subject: change types of volumes from "int" to "int32_t" git-svn-id: file:///home/lennart/svn/public/libsydney/trunk@9 9ba3c220-e4d3-45a2-8aa3-73fcc9aff6ce --- converter.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'converter.c') 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); -- cgit