mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(pulseaudio): round volume
This commit is contained in:
parent
85f845ca43
commit
4626cbef63
@ -86,7 +86,7 @@ void waybar::modules::Pulseaudio::sinkInfoCb(pa_context* /*context*/,
|
|||||||
float volume = static_cast<float>(pa_cvolume_avg(&(i->volume)))
|
float volume = static_cast<float>(pa_cvolume_avg(&(i->volume)))
|
||||||
/ float{PA_VOLUME_NORM};
|
/ float{PA_VOLUME_NORM};
|
||||||
pa->sink_idx_ = i->index;
|
pa->sink_idx_ = i->index;
|
||||||
pa->volume_ = volume * 100.0f;
|
pa->volume_ = std::round(volume * 100.0f);
|
||||||
pa->muted_ = i->mute != 0;
|
pa->muted_ = i->mute != 0;
|
||||||
pa->desc_ = i->description;
|
pa->desc_ = i->description;
|
||||||
pa->port_name_ = i->active_port->name;
|
pa->port_name_ = i->active_port->name;
|
||||||
|
Loading…
Reference in New Issue
Block a user