aboutsummaryrefslogtreecommitdiffstats
path: root/libDRCdec
diff options
context:
space:
mode:
Diffstat (limited to 'libDRCdec')
-rw-r--r--libDRCdec/src/FDK_drcDecLib.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/libDRCdec/src/FDK_drcDecLib.cpp b/libDRCdec/src/FDK_drcDecLib.cpp
index b29b79d..16b8152 100644
--- a/libDRCdec/src/FDK_drcDecLib.cpp
+++ b/libDRCdec/src/FDK_drcDecLib.cpp
@@ -173,13 +173,11 @@ static int isResetNeeded(HANDLE_DRC_DECODER hDrcDec,
return resetNeeded;
}
-static DRC_DEC_ERROR startSelectionProcess(HANDLE_DRC_DECODER hDrcDec) {
- DRC_ERROR dErr = DE_OK;
- DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR;
+static void startSelectionProcess(HANDLE_DRC_DECODER hDrcDec) {
int uniDrcConfigHasChanged = 0;
SEL_PROC_OUTPUT oldSelProcOutput = hDrcDec->selProcOutput;
- if (!hDrcDec->status) return DRC_DEC_NOT_READY;
+ if (!hDrcDec->status) return;
if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
uniDrcConfigHasChanged = hDrcDec->uniDrcConfig.diff;
@@ -189,10 +187,9 @@ static DRC_DEC_ERROR startSelectionProcess(HANDLE_DRC_DECODER hDrcDec) {
*/
hDrcDec->selProcOutput.numSelectedDrcSets = 0;
- sErr = drcDec_SelectionProcess_Process(
+ drcDec_SelectionProcess_Process(
hDrcDec->hSelectionProc, &(hDrcDec->uniDrcConfig),
&(hDrcDec->loudnessInfoSet), &(hDrcDec->selProcOutput));
- if (sErr) return DRC_DEC_OK;
hDrcDec->selProcInputDiff = 0;
hDrcDec->uniDrcConfig.diff = 0;
@@ -202,15 +199,12 @@ static DRC_DEC_ERROR startSelectionProcess(HANDLE_DRC_DECODER hDrcDec) {
if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
if (isResetNeeded(hDrcDec, oldSelProcOutput) || uniDrcConfigHasChanged) {
- dErr =
- drcDec_GainDecoder_Config(hDrcDec->hGainDec, &(hDrcDec->uniDrcConfig),
- hDrcDec->selProcOutput.numSelectedDrcSets,
- hDrcDec->selProcOutput.selectedDrcSetIds,
- hDrcDec->selProcOutput.selectedDownmixIds);
- if (dErr) return DRC_DEC_OK;
+ drcDec_GainDecoder_Config(hDrcDec->hGainDec, &(hDrcDec->uniDrcConfig),
+ hDrcDec->selProcOutput.numSelectedDrcSets,
+ hDrcDec->selProcOutput.selectedDrcSetIds,
+ hDrcDec->selProcOutput.selectedDownmixIds);
}
}
- return DRC_DEC_OK;
}
DRC_DEC_ERROR
@@ -721,9 +715,9 @@ FDK_drcDec_ReadUniDrc(HANDLE_DRC_DECODER hDrcDec,
drcDec_GainDecoder_GetFrameSize(hDrcDec->hGainDec),
drcDec_GainDecoder_GetDeltaTminDefault(hDrcDec->hGainDec),
&(hDrcDec->uniDrcGain));
- if (dErr) return DRC_DEC_NOT_OK;
startSelectionProcess(hDrcDec);
+ if (dErr) return DRC_DEC_NOT_OK;
hDrcDec->status = DRC_DEC_NEW_GAIN_PAYLOAD;