summaryrefslogtreecommitdiffstats
path: root/mpvcore/mp_core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-19 14:32:09 +0200
committerwm4 <wm4@nowhere>2013-09-19 14:32:09 +0200
commit38b2c97fd6b59b923ad309c19c457cbc0210da17 (patch)
tree9a0512b19ab0c0ce7ca3470512c0b648ee2afc57 /mpvcore/mp_core.h
parent4ba52a9e821486d9d9b076a5187583af144b8cec (diff)
downloadmpv-38b2c97fd6b59b923ad309c19c457cbc0210da17.tar.bz2
mpv-38b2c97fd6b59b923ad309c19c457cbc0210da17.tar.xz
mixer: refactor, fix some aspects of --volume handling
Refactor how mixer.c does volume/mute restoration and initialization. Move to handling of --volume and --mute to mixer.c. Simplify the implementation of these and hopefully fix bugs/strange behavior related to using them as file-local options (this uses a somewhat dirty trick: the option values are reverted to "auto" after initialization). Put most code related to initialization and volume restoring in probe_softvol() and restore_volume(). Having this code all in one place is less confusing. Instead of trying to detect whether to use softvol at runtime, detect it at initialization time using AOCONTROL_GET_VOLUME (same with mute, AOCONTROL_GET_MUTE). This implies we expect SET_VOLUME/SET_MUTE to work if the GET variants work. Hopefully this is always the case. This is also preparation for being able to change volume/mute settings if audio is disabled, and for allowing restoring value with playback resume.
Diffstat (limited to 'mpvcore/mp_core.h')
-rw-r--r--mpvcore/mp_core.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/mpvcore/mp_core.h b/mpvcore/mp_core.h
index 9f3e095110..8f57a65edf 100644
--- a/mpvcore/mp_core.h
+++ b/mpvcore/mp_core.h
@@ -29,7 +29,6 @@
#define INITIALIZED_VO 1
#define INITIALIZED_AO 2
-#define INITIALIZED_VOL 4
#define INITIALIZED_GETCH2 8
#define INITIALIZED_PLAYBACK 16
#define INITIALIZED_STREAM 64