From 5594718b6bda3a230e2e2c3cb06d2837c5a02688 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 18 Nov 2013 14:16:08 +0100 Subject: audio/filter: remove unneeded AF_CONTROLs, convert to enum The AF control commands used an elaborate and unnecessary organization for the command constants. Get rid of all that and convert the definitions to a simple enum. Also remove the control commands that were not really needed, because they were not used outside of the filters that implemented them. --- audio/filter/af_lavrresample.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'audio/filter/af_lavrresample.c') diff --git a/audio/filter/af_lavrresample.c b/audio/filter/af_lavrresample.c index e5a9a40efc..f659511f82 100644 --- a/audio/filter/af_lavrresample.c +++ b/audio/filter/af_lavrresample.c @@ -259,18 +259,18 @@ static int control(struct af_instance *af, int cmd, void *arg) r = configure_lavrr(af, in, out); return r; } - case AF_CONTROL_FORMAT_FMT | AF_CONTROL_SET: { + case AF_CONTROL_SET_FORMAT: { if (af_to_avformat(*(int*)arg) == AV_SAMPLE_FMT_NONE) return AF_FALSE; mp_audio_set_format(af->data, *(int*)arg); return AF_OK; } - case AF_CONTROL_CHANNELS | AF_CONTROL_SET: { + case AF_CONTROL_SET_CHANNELS: { mp_audio_set_channels(af->data, (struct mp_chmap *)arg); return AF_OK; } - case AF_CONTROL_RESAMPLE_RATE | AF_CONTROL_SET: + case AF_CONTROL_SET_RESAMPLE_RATE: out->rate = *(int *)arg; return AF_OK; } -- cgit v1.2.3