Skip to content

Commit

Permalink
don't correct DC offset if setting is off
Browse files Browse the repository at this point in the history
  • Loading branch information
tildearrow committed Oct 29, 2023
1 parent 717e75f commit 64ef082
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/engine/dispatchContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ void DivDispatchContainer::fillBuf(size_t runtotal, size_t offset, size_t size)

if (dcOffCompensation && runtotal>0) {
dcOffCompensation=false;
for (int i=0; i<outs; i++) {
if (bbIn[i]==NULL) continue;
prevSample[i]=bbIn[i][0];
if (hiPass) {
for (int i=0; i<outs; i++) {
if (bbIn[i]==NULL) continue;
prevSample[i]=bbIn[i][0];
}
}
}
if (lowQuality) {
Expand Down Expand Up @@ -220,7 +222,7 @@ void DivDispatchContainer::clear() {
prevSample[i]=0;
}

if (dispatch->getDCOffRequired()) {
if (dispatch->getDCOffRequired() && hiPass) {
dcOffCompensation=true;
}
}
Expand Down

0 comments on commit 64ef082

Please sign in to comment.