diff options
author | Xin Li <delphij@google.com> | 2020-08-27 10:16:06 -0700 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2020-08-27 10:16:06 -0700 |
commit | 7a0dde5d5dc4d24095c0391e7fa8297de3c7cd45 (patch) | |
tree | 0e353968c34e8c9699663a9b252836b70847c30b /libDRCdec/src/FDK_drcDecLib.cpp | |
parent | 946a672b0f5b8481eb3a429f854fcb34d847d692 (diff) | |
parent | e0624f4c05df8b171555bc8c8748ee93655f5b3e (diff) | |
download | fdk-aac-7a0dde5d5dc4d24095c0391e7fa8297de3c7cd45.tar.gz fdk-aac-7a0dde5d5dc4d24095c0391e7fa8297de3c7cd45.tar.bz2 fdk-aac-7a0dde5d5dc4d24095c0391e7fa8297de3c7cd45.zip |
Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I9bd31724ae68b9a0b3eb4bb5be3782359824aa1f
Change-Id: Idcdb13a8c37b0b4b5446169c3e80dfe55586bc77
Diffstat (limited to 'libDRCdec/src/FDK_drcDecLib.cpp')
-rw-r--r-- | libDRCdec/src/FDK_drcDecLib.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libDRCdec/src/FDK_drcDecLib.cpp b/libDRCdec/src/FDK_drcDecLib.cpp index 98a73ca..26e5b78 100644 --- a/libDRCdec/src/FDK_drcDecLib.cpp +++ b/libDRCdec/src/FDK_drcDecLib.cpp @@ -145,6 +145,10 @@ struct s_drc_decoder { SEL_PROC_OUTPUT selProcOutput; } DRC_DECODER; +static int _getGainStatus(HANDLE_UNI_DRC_GAIN hUniDrcGain) { + return hUniDrcGain->status; +} + static int isResetNeeded(HANDLE_DRC_DECODER hDrcDec, const SEL_PROC_OUTPUT oldSelProcOutput) { int i, resetNeeded = 0; @@ -515,6 +519,8 @@ LONG FDK_drcDec_GetParam(HANDLE_DRC_DECODER hDrcDec, } case DRC_DEC_TARGET_CHANNEL_COUNT_SELECTED: return (LONG)hDrcDec->selProcOutput.targetChannelCount; + case DRC_DEC_OUTPUT_LOUDNESS: + return (LONG)hDrcDec->selProcOutput.outputLoudness; default: return 0; } @@ -729,7 +735,9 @@ FDK_drcDec_ReadUniDrcGain(HANDLE_DRC_DECODER hDrcDec, &(hDrcDec->uniDrcGain)); if (dErr) return DRC_DEC_NOT_OK; - hDrcDec->status = DRC_DEC_NEW_GAIN_PAYLOAD; + if (_getGainStatus(&(hDrcDec->uniDrcGain))) { + hDrcDec->status = DRC_DEC_NEW_GAIN_PAYLOAD; + } return DRC_DEC_OK; } @@ -751,7 +759,9 @@ FDK_drcDec_ReadUniDrc(HANDLE_DRC_DECODER hDrcDec, startSelectionProcess(hDrcDec); if (dErr) return DRC_DEC_NOT_OK; - hDrcDec->status = DRC_DEC_NEW_GAIN_PAYLOAD; + if (_getGainStatus(&(hDrcDec->uniDrcGain))) { + hDrcDec->status = DRC_DEC_NEW_GAIN_PAYLOAD; + } return DRC_DEC_OK; } |