resampler: Improve s16<-->s32 conversion, use s16 work format if input or output is s16
Problem: s16 to s32 conversion is performed as s16->float->s32 (via work
format float) for resamplers TRIVIAL, COPY, PEAKS.
Precision and efficiency suffers: e.g. 0x9fff results in 0x9ffe4001 (instead
of 0x9fff0000) and there are two sample format conversions instead of one
conversion.
Solution: If input or output format is s16, then choose the work format
to be s16 as well.
If remapping is to be performed, we could stick to work format float32ne for
precision reseans. This is debateable.
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>