1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-18 04:51:52 +00:00

mixer: per-app volume and private volume conflict

Per-app volume would change the volume across all instances of the same
application, while a private volume control (HAS_PER_APP_VOLUME)
obviously should influence only one instance/audio stream only.
This commit is contained in:
wm4 2015-04-01 01:15:12 +02:00
parent ab3a64ee4c
commit d4e31166b7

View File

@ -19,6 +19,7 @@
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <libavutil/common.h>
@ -251,7 +252,8 @@ static void probe_softvol(struct mixer *mixer)
{
bool ao_perapp = ao_control(mixer->ao, AOCONTROL_HAS_PER_APP_VOLUME, 0) == 1;
bool ao_softvol = ao_control(mixer->ao, AOCONTROL_HAS_SOFT_VOLUME, 0) == 1;
mixer->persistent_volume = !ao_softvol || ao_perapp;
assert(!(ao_perapp && ao_softvol));
mixer->persistent_volume = !ao_softvol;
if (mixer->opts->softvol == SOFTVOL_AUTO) {
// No system-wide volume => fine with AO volume control.