Skip to content

Commit

Permalink
pulse: use ceil() instead of floor() for volume percentages
Browse files Browse the repository at this point in the history
Fixes GHI#26.
  • Loading branch information
falconindy committed Aug 19, 2014
1 parent 9692904 commit 067f37d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pulse.cc
Expand Up @@ -77,7 +77,7 @@ static pa_cvolume* value_to_cvol(long value, pa_cvolume *cvol) {
}

static int volume_as_percent(const pa_cvolume* cvol) {
return pa_cvolume_avg(cvol) * 100.0 / PA_VOLUME_NORM;
return pa_cvolume_avg(cvol) * 100.0 / PA_VOLUME_NORM + 0.5;
}

static int xstrtol(const char *str, long *out) {
Expand Down

0 comments on commit 067f37d

Please sign in to comment.