diff options
author | wm4 <wm4@nowhere> | 2015-02-11 15:42:43 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-11 16:32:40 +0100 |
commit | d85aa35ffbd978c7ae86bf84ebf9ac7686312e8f (patch) | |
tree | f61619e8ff9db7610e3d8a21e5cb761e3e5de0d1 | |
parent | 8c055f873f9ec66842c08e157a943ce2c5301f55 (diff) |
af: account for queued frames in audio position calculation
af_rubberband exposed this issue.
-rw-r--r-- | audio/filter/af.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c index bde469db8b..846ebea3c3 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -747,6 +747,8 @@ double af_calc_delay(struct af_stream *s) double delay = 0.0; while (af) { delay += af->delay; + for (int n = 0; n < af->num_out_queued; n++) + delay += af->out_queued[n]->samples / (double)af->data->rate; af = af->next; } return delay; |