remap: Make resampler's remap structure more self-contained

Initialization of the remap structure now happens in one place

Rename calc_map_table() to setup_remap(), copy sample format and
channel specs; the remap structure is initialized when we know the
work sample format of the resampler

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
Peter Meerwald 2014-04-16 11:25:58 +02:00 committed by Peter Meerwald
parent 937b4175c2
commit 9362bdc8a1
6 changed files with 32 additions and 41 deletions

View file

@ -30,8 +30,8 @@ typedef struct pa_remap pa_remap_t;
typedef void (*pa_do_remap_func_t) (pa_remap_t *m, void *d, const void *s, unsigned n);
struct pa_remap {
pa_sample_format_t *format;
pa_sample_spec *i_ss, *o_ss;
pa_sample_format_t format;
pa_sample_spec i_ss, o_ss;
float map_table_f[PA_CHANNELS_MAX][PA_CHANNELS_MAX];
int32_t map_table_i[PA_CHANNELS_MAX][PA_CHANNELS_MAX];
pa_do_remap_func_t do_remap;