Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DOCS/man/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2699,8 +2699,8 @@ Property list
currently active, and only if the underlying implementation supports volume
control. What this option does, or how the value is interpreted depends on
the API. For example, on ALSA this usually changes system-wide audio volume
on a linear curve, while with PulseAudio this controls per-application volume
on a cubic curve.
on a linear curve, while with PipeWire and PulseAudio this controls
per-application volume on a cubic curve.

``ao-mute`` (RW)
Similar to ``ao-volume``, but controls the mute state. May be unimplemented
Expand Down
5 changes: 3 additions & 2 deletions audio/out/ao_pipewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,13 @@ 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 vol * 100;
return cbrt(vol) * 100;
}

static float mp_volume_to_spa_volume(float vol)
{
return vol / 100;
vol /= 100;
return vol * vol * vol;
}

static float volume_avg(float* vols, uint32_t n)
Expand Down
Loading