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

Commit c25affd2 authored by Rivukanta Bhattacharya's avatar Rivukanta Bhattacharya
Browse files

libeffects: Clamp output after Treble biquad

Bug: 183674870
Test: lvm/tests/build_and_run_all_unit_tests.sh

Change-Id: Ic964bf963f4f994ba056dcfcef83efbffff6b5d1
parent 08d9d325
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