mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 18:05:21 +00:00
ao_pipewire: pipewire uses linear volume
Don't use cube root volumes, pipewire uses linear volumes.
This commit is contained in:
parent
c01bb44e36
commit
c7b17beaf1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user