summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-07-17 19:21:28 +0200
committerwm4 <wm4@nowhere>2016-07-17 19:21:28 +0200
commit77e1e8e38e7b8d9318dc1bb437a88d8f13b7a5c9 (patch)
treed64c47c331174f59eeecb9a713ba76aa4b7110cb /options
parent79974e7ad94e7658c780e3b446a7822a533675e4 (diff)
downloadmpv-77e1e8e38e7b8d9318dc1bb437a88d8f13b7a5c9.tar.bz2
mpv-77e1e8e38e7b8d9318dc1bb437a88d8f13b7a5c9.tar.xz
audio: refactor mixer code and delete mixer.c
mixer.c didn't really deserve to be separate anymore, as half of its contents were unnecessary glue code after recent changes. It also created a weird split between audio.c and af.c due to the fact that mixer.c could insert audio filters. With the code being in audio.c directly, together with other code that unserts filters during runtime, it will be possible to cleanup this code a bit and make it work like the video filter code. As part of this change, make the balance code work like the volume code, and add an option to back the current balance value. Also, since the balance semantics are unexpected for most users (panning between the audio channels, instead of just changing the relative volume), and there are some other volumes, formally deprecate both the old property and the new option.
Diffstat (limited to 'options')
-rw-r--r--options/options.c2
-rw-r--r--options/options.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/options/options.c b/options/options.c
index 89ee24a829..acef3ba6b9 100644
--- a/options/options.c
+++ b/options/options.c
@@ -40,7 +40,6 @@
#include "video/csputils.h"
#include "video/hwdec.h"
#include "sub/osd.h"
-#include "audio/mixer.h"
#include "audio/filter/af.h"
#include "audio/decode/dec_audio.h"
#include "player/core.h"
@@ -424,6 +423,7 @@ const m_option_t mp_opts[] = {
{"weak", -1})),
OPT_DOUBLE("audio-buffer", audio_buffer, M_OPT_MIN | M_OPT_MAX,
.min = 0, .max = 10),
+ OPT_FLOATRANGE("balance", balance, 0, -1, 1),
OPT_GEOMETRY("geometry", vo.geometry, 0),
OPT_SIZE_BOX("autofit", vo.autofit, 0),
diff --git a/options/options.h b/options/options.h
index 3e8474fd75..7690823aab 100644
--- a/options/options.h
+++ b/options/options.h
@@ -90,6 +90,7 @@ typedef struct MPOpts {
int force_vo;
int softvol;
float softvol_volume;
+ float balance;
int softvol_mute;
float softvol_max;
int gapless_audio;