diff options
author | Xin Li <delphij@google.com> | 2020-09-10 17:22:12 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-09-10 17:22:12 +0000 |
commit | 89b6626d5d9f5968da53d107e7f6c2666ef5400f (patch) | |
tree | 0e353968c34e8c9699663a9b252836b70847c30b /libDRCdec/src/FDK_drcDecLib.cpp | |
parent | 946a672b0f5b8481eb3a429f854fcb34d847d692 (diff) | |
parent | 7f7e67fe023aa5e479aba0388a7e3fb591bda4e5 (diff) | |
download | fdk-aac-89b6626d5d9f5968da53d107e7f6c2666ef5400f.tar.gz fdk-aac-89b6626d5d9f5968da53d107e7f6c2666ef5400f.tar.bz2 fdk-aac-89b6626d5d9f5968da53d107e7f6c2666ef5400f.zip |
Merge "Merge Android R"
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; } |