From 797f357b02a868704cf3edc4b43c0ce5b85c1d24 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Thu, 5 May 2022 19:40:57 +0200 Subject: [PATCH] Use multiple channels --- libspeexdsp/testresample2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libspeexdsp/testresample2.c b/libspeexdsp/testresample2.c index db865556..26cf56e9 100644 --- a/libspeexdsp/testresample2.c +++ b/libspeexdsp/testresample2.c @@ -40,6 +40,7 @@ #include #define PERIOD 32 +#define CHANNELS 2 #define INBLOCK 1024 #define RATE 48000 @@ -48,7 +49,7 @@ int main() spx_uint32_t i; float *fin, *fout; int rate = 1000, off = 0, avail = INBLOCK; - SpeexResamplerState *st = speex_resampler_init(1, RATE, RATE, 4, NULL); + SpeexResamplerState *st = speex_resampler_init(CHANNELS, RATE, RATE, 4, NULL); speex_resampler_set_rate(st, RATE, rate); speex_resampler_skip_zeros(st);