mpv/audio/filter
ferreum cf8b7ff0d6 af_scaletempo2: calculate latency by center of search block
This changes the emitted pts values from the start of the search block
to the center of the search block. Change initial `output_time`
accordingly. Initial `search_block_index` is irrelevant, because it's
overwritten before the first iteration.

Using the `output_time` removes the rounding of `search_block_index`,
which also fixes the <20 microsecond gaps in timestamps between output
packets.

Rationale:

The variance in audio position was in the range `0..search-interval`.

With this change, the range is

    (- search-interval / 2)..(search-interval / 2)`

which ensures lower maximum offset.
2023-09-20 14:36:23 +02:00
..
af_drop.c audio: redo video-sync=display-adrop 2020-05-23 04:04:46 +02:00
af_format.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
af_lavcac3enc.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
af_rubberband.c af_rubberband: add new engine option in rubberband 3.0.0 2022-08-03 15:29:02 +00:00
af_scaletempo.c af_scaletempo: handle obscure integer overflow 2020-06-02 20:43:49 +02:00
af_scaletempo2.c af_scaletempo2: fix speed change latency and pts spikes 2023-09-20 14:36:23 +02:00
af_scaletempo2_internals.c af_scaletempo2: calculate latency by center of search block 2023-09-20 14:36:23 +02:00
af_scaletempo2_internals.h af_scaletempo2: calculate latency by center of search block 2023-09-20 14:36:23 +02:00