[vlc-commits] soxr: instantly change the rate

Thomas Guillem git at videolan.org
Tue May 5 13:51:55 CEST 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon May  4 14:40:48 2020 +0200| [5ee13b8b38d61fdad158d2b4cdc01228095f2ad3] | 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).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ee13b8b38d61fdad158d2b4cdc01228095f2ad3
---

 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 757edd5d7e..81590c827f 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