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

Commit 6ca199ac authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "ReverbContext: Add Bypass Functionality" into main am: bbcbab33

parents 8837f2f3 bbcbab33
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#define LOG_TAG "ReverbContext"
#include <android-base/logging.h>
#include <Utils.h>
#include <audio_utils/primitives.h>

#include "ReverbContext.h"
#include "VectorArithmetic.h"
@@ -347,6 +348,15 @@ IEffect::Status ReverbContext::process(float* in, float* out, int samples) {
            mCommon.output.base.channelMask);
    int frameCount = mCommon.input.frameCount;

    if (mBypass) {
        if (isAuxiliary()) {
            memset(out, 0, getOutputFrameSize() * frameCount);
        } else {
            memcpy_to_float_from_float_with_clamping(out, in, samples, 1);
        }
        return {STATUS_OK, samples, outChannels * frameCount};
    }

    // Reverb only effects the stereo channels in multichannel source.
    if (channels < 1 || channels > LVM_MAX_CHANNELS) {
        LOG(ERROR) << __func__ << " process invalid PCM channels " << channels;