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

Commit 9ea359b3 authored by Andy Hung's avatar Andy Hung Committed by Automerger Merge Worker
Browse files

Merge "libeffects: Clamp output after Treble biquad" am: 8d22b094 am: 7278e4d2

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1652257

Change-Id: I45678a6fb774525d46a24125bf8895add2a92f93
parents 364e6e0a 7278e4d2
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