summaryrefslogtreecommitdiffstats
path: root/audio/filter/af.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-07-10 18:39:50 +0200
committerwm4 <wm4@nowhere>2016-07-10 19:51:09 +0200
commit2eac58eaa97ec667a2512cd27c35f006a22ec074 (patch)
treefafe5b96783256f035c72aa14d6fe21a29cc0573 /audio/filter/af.h
parent065bb635d98f7655ce0d1f2afe7bbbcf737f3fea (diff)
downloadmpv-2eac58eaa97ec667a2512cd27c35f006a22ec074.tar.bz2
mpv-2eac58eaa97ec667a2512cd27c35f006a22ec074.tar.xz
audio: cleanup audio filter format negotiation
The algorithm and functionality is the same, but the code becomes much simpler and easier to follow. The assumption that there is only 1 conversion filter (lavrresample) helps with the simplification, but the main change is to use the same code for format/channels/rate. Get rid of the different AF_CONTROL_SET_* controls, and change the af->data parameters directly. (af->data is badly named, but essentially is a placeholder for the output format.) Also, instead of trying to use the af_reinit() loop to init inserted conversion filters or filters with changed output formats, do it inline, and move the common code to a filter_reinit() function. This gets rid of the awful retry variable. In general, this should not change any runtime behavior.
Diffstat (limited to 'audio/filter/af.h')
-rw-r--r--audio/filter/af.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/audio/filter/af.h b/audio/filter/af.h
index 9c49081f66..697024b781 100644
--- a/audio/filter/af.h
+++ b/audio/filter/af.h
@@ -112,9 +112,6 @@ struct af_stream {
enum af_control {
AF_CONTROL_REINIT = 1,
AF_CONTROL_RESET,
- 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,
@@ -160,6 +157,4 @@ int af_test_output(struct af_instance *af, struct mp_audio *out);
int af_from_ms(int n, float *in, int *out, int rate, float mi, float ma);
float af_softclip(float a);
-bool af_lavrresample_test_conversion(int src_format, int dst_format);
-
#endif /* MPLAYER_AF_H */