diff options
author | Felicia Lim <flim@google.com> | 2017-07-05 17:36:56 -0700 |
---|---|---|
committer | Felicia Lim <flim@google.com> | 2017-07-07 09:42:55 -0700 |
commit | 0c2090c324e4f2ba2a8621c8b083559bab74c7c5 (patch) | |
tree | fea1ab0038bc4102569d1ab4ee57a0f973895570 /src/opus_decoder.c | |
parent | a7703b70699299f078a189e19b6915120cded732 (diff) | |
download | libopus-o-iot-preview-5.tar.gz |
Opus 1.2.1android-o-iot-preview-5o-iot-preview-5
Change-Id: I551f1de5c5e121ac1275334e67c7e0f96ab18114
Test: - verified builds for arm*/mips*/x86*
- checked functionality using an emulator and stagefright
Diffstat (limited to 'src/opus_decoder.c')
-rw-r--r-- | src/opus_decoder.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/opus_decoder.c b/src/opus_decoder.c index 080bec50..149ae7f2 100644 --- a/src/opus_decoder.c +++ b/src/opus_decoder.c @@ -891,7 +891,7 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...) break; case OPUS_GET_LAST_PACKET_DURATION_REQUEST: { - opus_uint32 *value = va_arg(ap, opus_uint32*); + opus_int32 *value = va_arg(ap, opus_int32*); if (!value) { goto bad_arg; @@ -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; |