diff options
author | Max Kellermann <max@duempel.org> | 2016-03-06 23:20:26 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2016-03-06 23:23:30 +0100 |
commit | bbda335e021c3a4d6ccfce7916041d4fb089af5c (patch) | |
tree | a1c6361e3fc12cf0552794743713c3d785f43c00 /src/mixer | |
parent | d2dd6f7c709f70f325cad34a4bf283d80e832939 (diff) |
mixer/pulse: fix integer division rounding
Diffstat (limited to 'src/mixer')
-rw-r--r-- | src/mixer/plugins/PulseMixerPlugin.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mixer/plugins/PulseMixerPlugin.cxx b/src/mixer/plugins/PulseMixerPlugin.cxx index c5f20723b..e0f6407b0 100644 --- a/src/mixer/plugins/PulseMixerPlugin.cxx +++ b/src/mixer/plugins/PulseMixerPlugin.cxx @@ -218,7 +218,7 @@ PulseMixer::SetVolume(unsigned new_volume, Error &error) struct pa_cvolume cvolume; pa_cvolume_set(&cvolume, volume.channels, - (pa_volume_t)new_volume * PA_VOLUME_NORM / 100 + 0.5); + (new_volume * PA_VOLUME_NORM + 50) / 100); bool success = pulse_output_set_volume(output, &cvolume, error); if (success) volume = cvolume; |