ao_pipewire: pipewire uses linear volume

Don't use cube root volumes, pipewire uses linear volumes.
This commit is contained in:
Wim Taymans
2022-07-08 07:45:09 -07:00
committed by Philip Langdale
parent c01bb44e36
commit c7b17beaf1
+2 -3
View File
@@ -187,13 +187,12 @@ static void on_state_changed(void *userdata, enum pw_stream_state old, enum pw_s
static float spa_volume_to_mp_volume(float vol)
{
return cbrt(vol) * 100;
return vol * 100;
}
static float mp_volume_to_spa_volume(float vol)
{
vol /= 100;
return vol * vol * vol;
return vol / 100;
}
static float volume_avg(float* vols, uint32_t n)