diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-05-13 10:36:53 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-05-13 10:36:53 +0000 |
commit | 737cf2e69e0248e134979cbeb9230e71c908a53d (patch) | |
tree | 4764853cbc37f4911552946dfaeb5e6924048eba /converter.c | |
parent | 17e086aaa4960e3b4d779ad02d816e9452c0d458 (diff) |
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
Diffstat (limited to 'converter.c')
-rw-r--r-- | converter.c | 6 |
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); |