summaryrefslogtreecommitdiffstats
path: root/libSBRdec/src/sbr_dec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libSBRdec/src/sbr_dec.cpp')
-rw-r--r--libSBRdec/src/sbr_dec.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/libSBRdec/src/sbr_dec.cpp b/libSBRdec/src/sbr_dec.cpp
index 5a8b320..bd3cd10 100644
--- a/libSBRdec/src/sbr_dec.cpp
+++ b/libSBRdec/src/sbr_dec.cpp
@@ -585,14 +585,16 @@ sbr_dec ( HANDLE_SBR_DEC hSbrDec, /*!< handle to Decoder channel */
int maxShift = 0;
- if (hSbrDec->sbrDrcChannel.prevFact_exp > maxShift) {
- maxShift = hSbrDec->sbrDrcChannel.prevFact_exp;
- }
- if (hSbrDec->sbrDrcChannel.currFact_exp > maxShift) {
- maxShift = hSbrDec->sbrDrcChannel.currFact_exp;
- }
- if (hSbrDec->sbrDrcChannel.nextFact_exp > maxShift) {
- maxShift = hSbrDec->sbrDrcChannel.nextFact_exp;
+ if (hSbrDec->sbrDrcChannel.enable != 0) {
+ if (hSbrDec->sbrDrcChannel.prevFact_exp > maxShift) {
+ maxShift = hSbrDec->sbrDrcChannel.prevFact_exp;
+ }
+ if (hSbrDec->sbrDrcChannel.currFact_exp > maxShift) {
+ maxShift = hSbrDec->sbrDrcChannel.currFact_exp;
+ }
+ if (hSbrDec->sbrDrcChannel.nextFact_exp > maxShift) {
+ maxShift = hSbrDec->sbrDrcChannel.nextFact_exp;
+ }
}
/* copy DRC data to right channel (with PS both channels use the same DRC gains) */