aboutsummaryrefslogtreecommitdiffhomepage
path: root/audio
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2016-01-26 15:12:42 +0100
committerGravatar wm4 <wm4@nowhere>2016-01-26 15:23:09 +0100
commitd8aeeaa4b15e9adbbd021614848c40d4ff264124 (patch)
tree9d2fc2eddeb72b192d875838bc5107553ce589a9 /audio
parent502763fcc76cf36f11ed6c73d944699270568235 (diff)
command: always allow setting volume/mute properties
This seems generally easier when using libmpv (and was already requested and implemented before: see commit 327a779a; it was reverted some time later). With the weird internal logic we have to deal with, in particular the --softvol=no case (using system volume), and using the audio API's mixer (--softvol=auto on some systems), we still can't avoid all glitches and corner cases that complicate this issue so much. The API user is either recommended to use --softvol=yes or auto, or to watch the new mixer-active property, and assume the volume/mute properties have significant values if the mixer is active. Remaining glitches: - changing the volume/mute properties has no effect if no internal mixer is used (--softvol=no) and the mixer is not active; the actual mixer controls do not change, only the property values - --volume/--mute do not have an effect on the volume/mute properties before mixer initialization (the options strictly are only applied during mixer init) - volume-max is 100 while the mixer is not active
Diffstat (limited to 'audio')
-rw-r--r--audio/mixer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/audio/mixer.c b/audio/mixer.c
index 5f147872ab..01bb4d5088 100644
--- a/audio/mixer.c
+++ b/audio/mixer.c
@@ -399,4 +399,5 @@ void mixer_uninit_audio(struct mixer *mixer)
}
mixer->ao = NULL;
mixer->af = NULL;
+ mixer->softvol = false;
}