Skip to content

Commit

Permalink
Use multiple channels
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-zero committed May 5, 2022
1 parent d5338f6 commit a07181e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions libspeexdsp/testresample2.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,17 @@
#define INBLOCK 1024
#define RATE 48000

int main()
int main(int argc, char **argv)
{
spx_uint32_t i;
float *fin, *fout;
int rate = 1000, off = 0, avail = INBLOCK;
SpeexResamplerState *st = speex_resampler_init(1, RATE, RATE, 4, NULL);
int rate = 1000, off = 0, avail = INBLOCK, channels = 1;

if (argc > 1) {
channels = atoi(argv[1]);
}

SpeexResamplerState *st = speex_resampler_init(channels, RATE, RATE, 4, NULL);
speex_resampler_set_rate(st, RATE, rate);
speex_resampler_skip_zeros(st);

Expand Down

0 comments on commit a07181e

Please sign in to comment.