summaryrefslogtreecommitdiffstats
path: root/audio/filter/af.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-18 14:16:08 +0100
committerwm4 <wm4@nowhere>2013-11-18 14:21:01 +0100
commit5594718b6bda3a230e2e2c3cb06d2837c5a02688 (patch)
treedca02cab9bde6d50d148a62b20ec99aa8601b847 /audio/filter/af.h
parent93852b08f37f630b994d126751b4b9740a13219f (diff)
downloadmpv-5594718b6bda3a230e2e2c3cb06d2837c5a02688.tar.bz2
mpv-5594718b6bda3a230e2e2c3cb06d2837c5a02688.tar.xz
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.
Diffstat (limited to 'audio/filter/af.h')
-rw-r--r--audio/filter/af.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/audio/filter/af.h b/audio/filter/af.h
index 3a56c4c081..5c7450721e 100644
--- a/audio/filter/af.h
+++ b/audio/filter/af.h
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdbool.h>
+#include <sys/types.h>
#include "config.h"
@@ -28,7 +29,6 @@
#include "audio/format.h"
#include "audio/chmap.h"
#include "audio/audio.h"
-#include "control.h"
#include "mpvcore/mp_msg.h"
struct af_instance;
@@ -96,6 +96,28 @@ struct af_stream {
#define AF_ERROR -2
#define AF_FATAL -3
+// Parameters for af_control_*
+enum af_control {
+ AF_CONTROL_REINIT = 1,
+ AF_CONTROL_COMMAND_LINE,
+ AF_CONTROL_SET_RESAMPLE_RATE,
+ AF_CONTROL_SET_FORMAT,
+ AF_CONTROL_SET_CHANNELS,
+ AF_CONTROL_SET_VOLUME,
+ AF_CONTROL_GET_VOLUME,
+ AF_CONTROL_SET_PAN_LEVEL,
+ AF_CONTROL_SET_PAN_NOUT,
+ AF_CONTROL_SET_PAN_BALANCE,
+ AF_CONTROL_GET_PAN_BALANCE,
+ AF_CONTROL_SET_PLAYBACK_SPEED,
+};
+
+// Argument for AF_CONTROL_SET_PAN_LEVEL
+typedef struct af_control_ext_s {
+ void* arg; // Argument
+ int ch; // Chanel number
+} af_control_ext_t;
+
struct af_stream *af_new(struct MPOpts *opts);
void af_destroy(struct af_stream *s);
int af_init(struct af_stream *s);