summaryrefslogtreecommitdiffstats
path: root/libSBRdec
diff options
context:
space:
mode:
Diffstat (limited to 'libSBRdec')
-rw-r--r--libSBRdec/src/sbrdec_drc.cpp8
-rw-r--r--libSBRdec/src/sbrdecoder.cpp4
2 files changed, 5 insertions, 7 deletions
diff --git a/libSBRdec/src/sbrdec_drc.cpp b/libSBRdec/src/sbrdec_drc.cpp
index af71c41..a834c0b 100644
--- a/libSBRdec/src/sbrdec_drc.cpp
+++ b/libSBRdec/src/sbrdec_drc.cpp
@@ -127,8 +127,8 @@ void sbrDecoder_drcInitChannel (
hDrcData->currFact_exp = 1;
hDrcData->nextFact_exp = 1;
- hDrcData->numBandsCurr = 0;
- hDrcData->numBandsNext = 0;
+ hDrcData->numBandsCurr = 1;
+ hDrcData->numBandsNext = 1;
hDrcData->winSequenceCurr = 0;
hDrcData->winSequenceNext = 0;
@@ -490,9 +490,7 @@ void sbrDecoder_drcApply (
if (hDrcData == NULL) {
return;
}
- if ( (hDrcData->enable == 0)
- || ((hDrcData->numBandsCurr == 0) && (hDrcData->numBandsNext == 0))
- ) {
+ if (hDrcData->enable == 0) {
return; /* Avoid changing the scaleFactor even though the processing is disabled. */
}
diff --git a/libSBRdec/src/sbrdecoder.cpp b/libSBRdec/src/sbrdecoder.cpp
index a0668bd..ecddec3 100644
--- a/libSBRdec/src/sbrdecoder.cpp
+++ b/libSBRdec/src/sbrdecoder.cpp
@@ -137,7 +137,7 @@ amm-info@iis.fraunhofer.de
/* Decoder library info */
#define SBRDECODER_LIB_VL0 2
#define SBRDECODER_LIB_VL1 2
-#define SBRDECODER_LIB_VL2 1
+#define SBRDECODER_LIB_VL2 2
#define SBRDECODER_LIB_TITLE "SBR Decoder"
#define SBRDECODER_LIB_BUILD_DATE __DATE__
#define SBRDECODER_LIB_BUILD_TIME __TIME__
@@ -878,7 +878,7 @@ void sbrDecoder_drcDisable ( HANDLE_SBRDECODER self,
pSbrDrcChannelData = sbrDecoder_drcGetChannel( self, ch );
if ( pSbrDrcChannelData != NULL ) {
- pSbrDrcChannelData->enable = 0;
+ sbrDecoder_drcInitChannel( pSbrDrcChannelData );
}
}