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_scaletempo.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'audio/filter/af_scaletempo.c') diff --git a/audio/filter/af_scaletempo.c b/audio/filter/af_scaletempo.c index 659b7971f5..9ec7b6b89b 100644 --- a/audio/filter/af_scaletempo.c +++ b/audio/filter/af_scaletempo.c @@ -413,7 +413,7 @@ static int control(struct af_instance *af, int cmd, void *arg) return af_test_output(af, (struct mp_audio *)arg); } - case AF_CONTROL_PLAYBACK_SPEED | AF_CONTROL_SET: { + case AF_CONTROL_SET_PLAYBACK_SPEED: { if (s->speed_tempo) { if (s->speed_pitch) break; @@ -428,14 +428,6 @@ static int control(struct af_instance *af, int cmd, void *arg) } return AF_OK; } - case AF_CONTROL_SCALETEMPO_AMOUNT | AF_CONTROL_SET: { - s->scale = *(float *)arg; - s->scale = s->speed * s->scale_nominal; - return AF_OK; - } - case AF_CONTROL_SCALETEMPO_AMOUNT | AF_CONTROL_GET: - *(float *)arg = s->scale; - return AF_OK; } return AF_UNKNOWN; } -- cgit v1.2.3