Skip to content

Commit 394d582

Browse files
committed
Revert "ao_pipewire: pipewire uses linear volume"
This reverts commit c7b17be.
1 parent 55b43df commit 394d582

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

audio/out/ao_pipewire.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,13 @@ static void on_state_changed(void *userdata, enum pw_stream_state old, enum pw_s
273273

274274
static float spa_volume_to_mp_volume(float vol)
275275
{
276-
return vol * 100;
276+
return cbrt(vol) * 100;
277277
}
278278

279279
static float mp_volume_to_spa_volume(float vol)
280280
{
281-
return vol / 100;
281+
vol /= 100;
282+
return vol * vol * vol;
282283
}
283284

284285
static float volume_avg(float* vols, uint32_t n)

0 commit comments

Comments
 (0)