diff options
author | Xin Li <delphij@google.com> | 2019-09-04 13:33:32 -0700 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2019-09-04 13:33:32 -0700 |
commit | a209adb315f970aa97044a82551a6f5617d61ded (patch) | |
tree | fa62c4f58bc140ba5c0a27e2c913d3ea0a5bfe98 /libDRCdec/src/drcDec_gainDecoder.cpp | |
parent | c2eb64586d6dfc0f067ea66631b38d1922a106ed (diff) | |
parent | 62661035192a7f66b3722d8a1fd365391a35f292 (diff) | |
download | fdk-aac-a209adb315f970aa97044a82551a6f5617d61ded.tar.gz fdk-aac-a209adb315f970aa97044a82551a6f5617d61ded.tar.bz2 fdk-aac-a209adb315f970aa97044a82551a6f5617d61ded.zip |
DO NOT MERGE - Merge Android 10 into master
Bug: 139893257
Change-Id: I7e02014b30f1ae5d19dbb7126ebb2a69c411fe5c
Diffstat (limited to 'libDRCdec/src/drcDec_gainDecoder.cpp')
-rw-r--r-- | libDRCdec/src/drcDec_gainDecoder.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/libDRCdec/src/drcDec_gainDecoder.cpp b/libDRCdec/src/drcDec_gainDecoder.cpp index ca81fad..9d91267 100644 --- a/libDRCdec/src/drcDec_gainDecoder.cpp +++ b/libDRCdec/src/drcDec_gainDecoder.cpp @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -170,11 +170,10 @@ drcDec_GainDecoder_Open(HANDLE_DRC_GAIN_DECODER* phGainDec) { } DRC_ERROR -drcDec_GainDecoder_Init(HANDLE_DRC_GAIN_DECODER hGainDec, const int frameSize, - const int sampleRate) { +drcDec_GainDecoder_Init(HANDLE_DRC_GAIN_DECODER hGainDec) { DRC_ERROR err = DE_OK; - err = initGainDec(hGainDec, frameSize, sampleRate); + err = initGainDec(hGainDec); if (err) return err; initDrcGainBuffers(hGainDec->frameSize, &hGainDec->drcGainBuffers); @@ -183,6 +182,25 @@ drcDec_GainDecoder_Init(HANDLE_DRC_GAIN_DECODER hGainDec, const int frameSize, } DRC_ERROR +drcDec_GainDecoder_SetParam(HANDLE_DRC_GAIN_DECODER hGainDec, + const GAIN_DEC_PARAM paramType, + const int paramValue) { + switch (paramType) { + case GAIN_DEC_FRAME_SIZE: + if (paramValue < 0) return DE_PARAM_OUT_OF_RANGE; + hGainDec->frameSize = paramValue; + break; + case GAIN_DEC_SAMPLE_RATE: + if (paramValue < 0) return DE_PARAM_OUT_OF_RANGE; + hGainDec->deltaTminDefault = getDeltaTmin(paramValue); + break; + default: + return DE_PARAM_INVALID; + } + return DE_OK; +} + +DRC_ERROR drcDec_GainDecoder_SetCodecDependentParameters( HANDLE_DRC_GAIN_DECODER hGainDec, const DELAY_MODE delayMode, const int timeDomainSupported, |