From 90f1e9be19671017ba84d69f1429c04324a9b1e7 Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Mon, 7 Mar 2022 12:19:52 -0800 Subject: [PATCH] correct parameters to resampler I think? --- main/vcr_resample.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/vcr_resample.c b/main/vcr_resample.c index a3a9e173..599a9e7f 100755 --- a/main/vcr_resample.c +++ b/main/vcr_resample.c @@ -58,12 +58,12 @@ VCR_resample( short **dst, int dst_freq, speex_resampler_set_rate(speex_ctx, src_freq, dst_freq); } - spx_uint32_t in_pos = (spx_uint32_t)src_len * 2; - spx_uint32_t out_pos = sizeof (out_samps); + spx_uint32_t in_pos = (spx_uint32_t)src_len / 4; + spx_uint32_t out_pos = sizeof (out_samps) / 4; speex_resampler_process_interleaved_int(speex_ctx, src, &in_pos, out_samps, &out_pos); *dst = out_samps; - return (int)out_pos / 2; + return (int)out_pos * 4; } #endif // VCR_SUPPORT