Home | History | Annotate | Download | only in libspeex

Lines Matching refs:channel_index

332 static int resampler_basic_direct_single(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len)
336 int last_sample = st->last_sample[channel_index];
337 spx_uint32_t samp_frac_num = st->samp_frac_num[channel_index];
376 st->last_sample[channel_index] = last_sample;
377 st->samp_frac_num[channel_index] = samp_frac_num;
384 static int resampler_basic_direct_double(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len)
388 int last_sample = st->last_sample[channel_index];
389 spx_uint32_t samp_frac_num = st->samp_frac_num[channel_index];
427 st->last_sample[channel_index] = last_sample;
428 channel_index] = samp_frac_num;
433 static int resampler_basic_interpolate_single(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len)
437 int last_sample = st->last_sample[channel_index];
438 spx_uint32_t samp_frac_num = st->samp_frac_num[channel_index];
488 st->last_sample[channel_index] = last_sample;
489 st->samp_frac_num[channel_index] = samp_frac_num;
496 static int resampler_basic_interpolate_double(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len)
500 int last_sample = st->last_sample[channel_index];
501 spx_uint32_t samp_frac_num = st->samp_frac_num[channel_index];
550 st->last_sample[channel_index] = last_sample;
551 st->samp_frac_num[channel_index] = samp_frac_num;
803 static int speex_resampler_process_native(SpeexResamplerState *st, spx_uint32_t channel_index, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len)
808 spx_word16_t *mem = st->mem + channel_index * st->mem_alloc_size;
814 out_sample = st->resampler_ptr(st, channel_index, mem, in_len, out, out_len);
816 if (st->last_sample[channel_index] < (spx_int32_t)*in_len)
817 *in_len = st->last_sample[channel_index];
819 st->last_sample[channel_index] -= *in_len;
829 static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_index, spx_word16_t **out, spx_uint32_t out_len) {
830 spx_uint32_t tmp_in_len = st->magic_samples[channel_index];
831 spx_word16_t *mem = st->mem + channel_index * st->mem_alloc_size;
834 speex_resampler_process_native(st, channel_index, &tmp_in_len, *out, &out_len);
836 st->magic_samples[channel_index] -= tmp_in_len;
839 if (st->magic_samples[channel_index])
842 for (i=0;i<st->magic_samples[channel_index];i++)
850 EXPORT int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len)
852 EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len)
858 spx_word16_t *x = st->mem + channel_index * st->mem_alloc_size;
863 channel_index])
864 olen -= speex_resampler_magic(st, channel_index, &out, olen);
865 if (! st->magic_samples[channel_index]) {
877 speex_resampler_process_native(st, channel_index, &ichunk, out, &ochunk);
891 EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len)
893 EXPORT int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len)
901 spx_word16_t *x = st->mem + channel_index * st->mem_alloc_size;
920 if (st->magic_samples[channel_index]) {
921 omagic = speex_resampler_magic(st, channel_index, &y, ochunk);
925 if (! st->magic_samples[channel_index]) {
938 speex_resampler_process_native(st, channel_index, &ichunk, y, &ochunk);