short l, r;
for (i = 0; i < samples; i++) {
- int fl,fr,c,rl,rr,lfe;
+ int fl,fr,c,rl,rr;
fl = input[0];
fr = input[1];
c = input[2];
- lfe = input[3];
+ // lfe = input[3];
rl = input[4];
rr = input[5];
ch8<<7 | ch7<<6 | ch6<<5 | ch5<<4 | ch4<<3 | ch3<<2 | ch2<<1 | ch1<<0
static const uint8_t supported_resampling[MAX_CHANNELS] = {
- //ouput channels:1 2 3 4 5 6 7 8
+ // output ch: 1 2 3 4 5 6 7 8
SUPPORT_RESAMPLE(1, 1, 0, 0, 0, 0, 0, 0), // 1 input channel
SUPPORT_RESAMPLE(1, 1, 0, 0, 0, 1, 0, 0), // 2 input channels
SUPPORT_RESAMPLE(0, 0, 1, 0, 0, 0, 0, 0), // 3 input channels
s->sample_fmt[0] = sample_fmt_in;
s->sample_fmt[1] = sample_fmt_out;
- s->sample_size[0] = av_get_bits_per_sample_fmt(s->sample_fmt[0]) >> 3;
- s->sample_size[1] = av_get_bits_per_sample_fmt(s->sample_fmt[1]) >> 3;
+ s->sample_size[0] = av_get_bytes_per_sample(s->sample_fmt[0]);
+ s->sample_size[1] = av_get_bytes_per_sample(s->sample_fmt[1]);
if (s->sample_fmt[0] != AV_SAMPLE_FMT_S16) {
if (!(s->convert_ctx[0] = av_audio_convert_alloc(AV_SAMPLE_FMT_S16, 1,