Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d22b094 authored by Andy Hung's avatar Andy Hung Committed by Gerrit Code Review
Browse files

Merge "libeffects: Clamp output after Treble biquad"

parents 925338f6 c25affd2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <system/audio.h>

#include "LVM_Private.h"
#include "ScalarArithmetic.h"
#include "VectorArithmetic.h"
#include "LVM_Coeffs.h"

@@ -178,6 +179,9 @@ LVM_ReturnStatus_en LVM_Process(LVM_Handle_t hInstance, const LVM_FLOAT* pInData
                 * Apply the filter
                 */
                pInstance->pTEBiquad->process(pProcessed, pProcessed, NrFrames);
                for (auto i = 0; i < NrChannels * NrFrames; i++) {
                    pProcessed[i] = LVM_Clamp(pProcessed[i]);
                }
            }
            /*
             * Volume balance