summaryrefslogtreecommitdiffstats
path: root/audio/filter/af_volume.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-04-04 15:04:07 +0200
committerwm4 <wm4@nowhere>2017-04-04 15:04:07 +0200
commitb96a74ec2a77a4fb8d62d331dcd9ed087e9813e6 (patch)
tree773d3cf493384ca11f2ba7da25174fb88c7731b2 /audio/filter/af_volume.c
parent98f8c4f36de0f08fec649aab16358190bf8d41b8 (diff)
downloadmpv-b96a74ec2a77a4fb8d62d331dcd9ed087e9813e6.tar.bz2
mpv-b96a74ec2a77a4fb8d62d331dcd9ed087e9813e6.tar.xz
audio: deprecate most audio filters
Well, ok, only 4 filters. The rest will survive in one or the other form.
Diffstat (limited to 'audio/filter/af_volume.c')
-rw-r--r--audio/filter/af_volume.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/filter/af_volume.c b/audio/filter/af_volume.c
index e1d5d45e89..fb7a87f9d0 100644
--- a/audio/filter/af_volume.c
+++ b/audio/filter/af_volume.c
@@ -42,6 +42,7 @@ struct priv {
int fast; // Use fix-point volume control
int detach; // Detach if gain volume is neutral
float cfg_volume;
+ int warn;
};
// Convert to gain value from dB. input <= -200dB will become 0 gain.
@@ -160,6 +161,8 @@ static int filter(struct af_instance *af, struct mp_audio *data)
static int af_open(struct af_instance *af)
{
struct priv *s = af->priv;
+ if (s->warn)
+ MP_WARN(af, "This filter is deprecated. Use --volume directly.\n");
af->control = control;
af->filter_frame = filter;
s->level = 1.0;
@@ -184,6 +187,7 @@ const struct af_info af_info_volume = {
OPT_FLAG("softclip", soft, 0),
OPT_FLAG("s16", fast, 0),
OPT_FLAG("detach", detach, 0),
+ OPT_FLAG("warn", warn, 0, OPTDEF_INT(1)),
{0}
},
};