summaryrefslogtreecommitdiff
path: root/src/opus_decoder.c
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-04-20 13:27:06 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-09-01 00:41:19 -0400
commit67821109b98ea81e136bf8ddf077529ecfd8bce3 (patch)
treed75d34f91a4d93b89bb0490abb1c4f55a49d2a1c /src/opus_decoder.c
parented539aa5cf7fefc8a337e2fea72b0fe1b1fc789c (diff)
downloadopus-exp_bitstream5.tar.gz
Make it possible to ignore inverted phase stereo for downmix purposesexp_bitstream5
Diffstat (limited to 'src/opus_decoder.c')
-rw-r--r--src/opus_decoder.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/opus_decoder.c b/src/opus_decoder.c
index 080bec50..af46d82f 100644
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -899,6 +899,26 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...)
*value = st->last_packet_duration;
}
break;
+ case OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST:
+ {
+ opus_int32 value = va_arg(ap, opus_int32);
+ if(value<0 || value>1)
+ {
+ goto bad_arg;
+ }
+ celt_decoder_ctl(celt_dec, OPUS_SET_PHASE_INVERSION_DISABLED(value));
+ }
+ break;
+ case OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST:
+ {
+ opus_int32 *value = va_arg(ap, opus_int32*);
+ if (!value)
+ {
+ goto bad_arg;
+ }
+ celt_decoder_ctl(celt_dec, OPUS_GET_PHASE_INVERSION_DISABLED(value));
+ }
+ break;
default:
/*fprintf(stderr, "unknown opus_decoder_ctl() request: %d", request);*/
ret = OPUS_UNIMPLEMENTED;