resample: Let the resampler object handle all channels

Move the code to loop over all channels in the resampler itself.
This is better because the resampler can reuse its state for
each channel.
This commit is contained in:
Wim Taymans 2019-03-22 16:48:35 +01:00
parent 5a2ccee1ff
commit f29d14fcc8
5 changed files with 97 additions and 64 deletions

View file

@ -32,8 +32,9 @@ struct resample {
void (*free) (struct resample *r);
void (*update_rate) (struct resample *r, double rate);
void (*process) (struct resample *r, int channel,
void *src, uint32_t *in_len, void *dst, uint32_t *out_len);
void (*process) (struct resample *r,
const void * SPA_RESTRICT src[], uint32_t *in_len,
void * SPA_RESTRICT dst[], uint32_t *out_len);
void (*reset) (struct resample *r);
void *data;
};