From 39af83a96dc0b38a8e96925ceeac9e3b058f51a0 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Fri, 13 Jul 2012 20:55:23 -0400 Subject: OPUS_{GET,SET}_LSB_DEPTH for multichannel. --- src/opus_multistream.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/opus_multistream.c b/src/opus_multistream.c index b593bf32..6713945a 100644 --- a/src/opus_multistream.c +++ b/src/opus_multistream.c @@ -442,6 +442,7 @@ int opus_multistream_encoder_ctl(OpusMSEncoder *st, int request, ...) } } break; + case OPUS_SET_LSB_DEPTH_REQUEST: case OPUS_SET_COMPLEXITY_REQUEST: case OPUS_SET_VBR_REQUEST: case OPUS_SET_VBR_CONSTRAINT_REQUEST: @@ -846,6 +847,26 @@ int opus_multistream_decoder_ctl(OpusMSDecoder *st, int request, ...) *value = (OpusDecoder*)ptr; } break; + case OPUS_GET_LSB_DEPTH_REQUEST: + { + int s; + /* This works for int32 params */ + opus_int32 value = va_arg(ap, opus_int32); + for (s=0;slayout.nb_streams;s++) + { + OpusDecoder *dec; + + dec = (OpusDecoder*)ptr; + if (s < st->layout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + ret = opus_decoder_ctl(dec, request, value); + if (ret != OPUS_OK) + break; + } + } + break; default: ret = OPUS_UNIMPLEMENTED; break; -- cgit v1.2.1