diff options
author | wm4 <wm4@nowhere> | 2015-04-01 01:15:12 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-01 01:15:59 +0200 |
commit | d4e31166b7299e0d05c312c8d16c72b1b03af4af (patch) | |
tree | f8ad86dd89471af2de7d5f30fd3b617abecd8711 /audio/mixer.c | |
parent | ab3a64ee4c485bf45bcf187c7c562c308ad2d990 (diff) | |
download | mpv-d4e31166b7299e0d05c312c8d16c72b1b03af4af.tar.bz2 mpv-d4e31166b7299e0d05c312c8d16c72b1b03af4af.tar.xz |
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.
Diffstat (limited to 'audio/mixer.c')
-rw-r--r-- | audio/mixer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/mixer.c b/audio/mixer.c index 9ea08b505e..0eb9c86453 100644 --- a/audio/mixer.c +++ b/audio/mixer.c @@ -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. |