[vlc-commits] soxr: instantly change the rate

Thomas Guillem git at videolan.org
Tue May 5 16:02:44 CEST 2020


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon May  4 14:40:48 2020 +0200| [34862f4b398298245cbca53a42a7473c7322c40e] | committer: Thomas Guillem

soxr: instantly change the rate

The core is already taking care of smooth rate change (when the resampler is
used to catch up a delay).

(cherry picked from commit 5ee13b8b38d61fdad158d2b4cdc01228095f2ad3)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=34862f4b398298245cbca53a42a7473c7322c40e
---

 modules/audio_filter/resampler/soxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_filter/resampler/soxr.c b/modules/audio_filter/resampler/soxr.c
index 5312ec4cc8..d0498097ab 100644
--- a/modules/audio_filter/resampler/soxr.c
+++ b/modules/audio_filter/resampler/soxr.c
@@ -317,7 +317,7 @@ Resample( filter_t *p_filter, block_t *p_in )
         if( f_ratio != p_sys->f_fixed_ratio )
         {
             /* using variable resampler */
-            soxr_set_io_ratio( p_sys->vr_soxr, 1 / f_ratio, i_olen );
+            soxr_set_io_ratio( p_sys->vr_soxr, 1 / f_ratio, 0 /* instant change */ );
             soxr = p_sys->vr_soxr;
         }
         else if( f_ratio == 1.0f )



More information about the vlc-commits mailing list