check the maximum volume of all sink inputs instead of the average volume to avoid digital amplification in favour of attenuation

This commit is contained in:
Lennart Poettering 2008-10-08 00:13:53 +02:00
parent 404cf74332
commit b048ae9f78

View file

@ -87,7 +87,7 @@ static void process_input_volume_change(
if (this && this == i) if (this && this == i)
continue; continue;
if (pa_cvolume_avg(&i->virtual_volume) > pa_cvolume_avg(&max_volume)) { if (pa_cvolume_max(&i->virtual_volume) > pa_cvolume_max(&max_volume)) {
max_volume = i->virtual_volume; max_volume = i->virtual_volume;
pa_cvolume_remap(&max_volume, &i->channel_map, &sink->channel_map); pa_cvolume_remap(&max_volume, &i->channel_map, &sink->channel_map);
} }