-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Currently always displays cubic curve of volume which is a non default behavior for Pipewire. (it's from old alsamixer here)
hyprpwcenter/src/pw/PwNode.cpp
Line 142 in 0298787
| volumes.at(i) = x; |
example currently volume 60% displays as 45%
Display percentage using the cubic curve (≈ perceptual/dB feel):
display_% = pow(linear, 3.0f) × 100
0.60³ ≈ 0.216, display as ~45%
wireplumber/.../modules/module-mixer-api.cL375
static inline gdouble
volume_from_linear (float vol, gint scale)
{
if (vol <= 0.0f)
return 0.0;
else if (scale == SCALE_CUBIC)
return cbrt(vol);
else
return vol;
}wireplumber/.../modules/module-mixer-api.cL386
static inline float
volume_to_linear (gdouble vol, gint scale)
{
if (vol <= 0.0f)
return 0.0;
else if (scale == SCALE_CUBIC)
return vol * vol * vol;
else
return vol;
}I'd try to do a PR but I can't compile C++ to save my life. <3
Metadata
Metadata
Assignees
Labels
No labels