From 4626cbef63edf6b770dc36b31208dddec1b8cc87 Mon Sep 17 00:00:00 2001 From: Alexis Date: Thu, 25 Oct 2018 13:57:35 +0200 Subject: [PATCH] fix(pulseaudio): round volume --- src/modules/pulseaudio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/pulseaudio.cpp b/src/modules/pulseaudio.cpp index 3e59a675..fb5b6f2b 100644 --- a/src/modules/pulseaudio.cpp +++ b/src/modules/pulseaudio.cpp @@ -86,7 +86,7 @@ void waybar::modules::Pulseaudio::sinkInfoCb(pa_context* /*context*/, float volume = static_cast(pa_cvolume_avg(&(i->volume))) / float{PA_VOLUME_NORM}; pa->sink_idx_ = i->index; - pa->volume_ = volume * 100.0f; + pa->volume_ = std::round(volume * 100.0f); pa->muted_ = i->mute != 0; pa->desc_ = i->description; pa->port_name_ = i->active_port->name;