Skip to content

Commit bf58bca

Browse files
committed
DRAFT CodecDSF
1 parent 90a7d77 commit bf58bca

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/AudioTools/AudioCodecs/CodecDSF.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,11 @@ class DSFDecoder : public AudioDecoder {
408408
for (int ch = 0; ch < meta.channels; ch++) {
409409
// Normalize by sample count and apply scaling factor
410410
channelAccum[ch] = channelAccum[ch] / samplesPerChannel * 0.8f;
411-
412-
// Apply low-pass filter to remove high-frequency noise
413-
channelAccum[ch] = channelFilters[ch].process(channelAccum[ch]);
411+
if (meta.filter_cutoff > 0.0f &&
412+
meta.filter_q > 0.0f) { // Only apply filter if configured
413+
// Apply low-pass filter to remove high-frequency noise
414+
channelAccum[ch] = channelFilters[ch].process(channelAccum[ch]);
415+
}
414416
//Serial.print(channelAccum[ch]);
415417
//Serial.print(" ");
416418

0 commit comments

Comments
 (0)