mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
pulse: Use the right conversion functions for volumes
PulseAudio uses cubic volumes and PipeWire uses linear volumes so use the right conversion functions from one to the other.
This commit is contained in:
parent
9c0ff170f9
commit
f3dda8e57b
3 changed files with 14 additions and 14 deletions
|
|
@ -899,7 +899,7 @@ static int create_stream(pa_stream_direction_t direction,
|
|||
s->disconnecting = false;
|
||||
if (volume) {
|
||||
for (i = 0; i < volume->channels; i++)
|
||||
s->channel_volumes[i] = volume->values[i] / (float) PA_VOLUME_NORM;
|
||||
s->channel_volumes[i] = pa_sw_volume_to_linear(volume->values[i]);
|
||||
s->n_channel_volumes = volume->channels;
|
||||
} else {
|
||||
for (i = 0; i < SPA_AUDIO_MAX_CHANNELS; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue