summaryrefslogtreecommitdiffstats
path: root/src/pulse
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse')
-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 3434cb18..4da133df 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -487,12 +487,12 @@ pa_cvolume* pa_cvolume_set_balance(pa_cvolume *v, const pa_channel_map *map, flo
for (c = 0; c < map->channels; c++) {
if (on_left(map->map[c])) {
if (left == 0)
- v->values[c] = 0;
+ v->values[c] = nleft;
else
v->values[c] = (pa_volume_t) (((uint64_t) v->values[c] * (uint64_t) nleft) / (uint64_t) left);
} else if (on_right(map->map[c])) {
if (right == 0)
- v->values[c] = 0;
+ v->values[c] = nright;
else
v->values[c] = (pa_volume_t) (((uint64_t) v->values[c] * (uint64_t) nright) / (uint64_t) right);
}