[vlc-commits] [Git][videolan/vlc][master] pipewire: use cubic volume scale as everything else
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Tue Oct 7 17:09:47 UTC 2025
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
a5827858 by Rémi Denis-Courmont at 2025-10-07T16:50:36+00:00
pipewire: use cubic volume scale as everything else
Fixes #28954.
- - - - -
1 changed file:
- modules/audio_output/pipewire.c
Changes:
=====================================
modules/audio_output/pipewire.c
=====================================
@@ -89,7 +89,8 @@ static void stream_control_info(void *data, uint32_t id,
for (size_t i = 0; i < control->n_values; i++)
vol = fmaxf(vol, control->values[i]);
- aout_VolumeReport(s->aout, vol);
+ /* Cubic root as the reciprocal mapping of set_volume()'s */
+ aout_VolumeReport(s->aout, cbrtf(vol));
break;
}
}
@@ -389,6 +390,7 @@ static void vlc_pw_stream_set_volume(struct vlc_pw_stream *s, float vol)
{
const struct pw_stream_control *old;
+ vol = vol * vol * vol; /* same cubic mapping as VLC's software volume */
vlc_pw_lock(s->context);
old = pw_stream_get_control(s->stream, SPA_PROP_channelVolumes);
if (old != NULL) {
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a58278587e624b775ea875c2d4e605d7a4b5f257
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a58278587e624b775ea875c2d4e605d7a4b5f257
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list