diff options
author | wm4 <wm4@nowhere> | 2015-01-13 20:14:02 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-13 20:14:02 +0100 |
commit | 0bbd65b09cb80ee6a822b27a53e7ddfd5d249cf2 (patch) | |
tree | edf7dcb12a658c2606653cb3b2dcaa3ac3acda99 /audio/filter/af.c | |
parent | 9418f884750e2837c51dea9bd300a5e4b3a8f16c (diff) | |
download | mpv-0bbd65b09cb80ee6a822b27a53e7ddfd5d249cf2.tar.bz2 mpv-0bbd65b09cb80ee6a822b27a53e7ddfd5d249cf2.tar.xz |
audio/filter: remove unused af_calc_filter_multiplier()
The purpose of this function was to filter only as much audio input as
needed to produce a certain amount of audio output. This could (in
theory) avoid excessive buffering when e.g. changing playback speed with
resampling.
Use of this was already removed in commit 5fd8a1e0. No problems were
experienced, so let's assume this feature is practically worthless.
(Though it's possible that it was quite useful over a decade ago, or in
some cornercases with evil files.)
Diffstat (limited to 'audio/filter/af.c')
-rw-r--r-- | audio/filter/af.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c index 365f5c46fb..d541687001 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -195,7 +195,6 @@ static struct af_instance *af_create(struct af_stream *s, char *name, struct af_instance *af = talloc_zero(NULL, struct af_instance); *af = (struct af_instance) { .info = info, - .mul = 1, .data = talloc_zero(af, struct mp_audio), .log = mp_log_new(af, s->log, name), .replaygain_data = s->replaygain_data, @@ -596,7 +595,6 @@ struct af_stream *af_new(struct mpv_global *global) .filter = dummy_filter, .priv = s, .data = &s->input, - .mul = 1.0, }; static const struct af_info out = { .name = "out" }; s->last = talloc(s, struct af_instance); @@ -606,7 +604,6 @@ struct af_stream *af_new(struct mpv_global *global) .filter = dummy_filter, .priv = s, .data = &s->filter_output, - .mul = 1.0, }; s->first->next = s->last; s->last->prev = s->first; @@ -758,20 +755,6 @@ done: return r; } -// Calculate average ratio of filter output samples to input samples. -// e.g: num_output_samples = mul * num_input_samples -double af_calc_filter_multiplier(struct af_stream *s) -{ - struct af_instance *af = s->first; - double mul = 1; - do { - mul *= af->mul; - af = af->next; - } while (af); - - return mul; -} - /* Calculate the total delay [seconds of output] caused by the filters */ double af_calc_delay(struct af_stream *s) { |