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

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

AudioMixer: Fix expand mono track to multi-channel am: e0c3d791

Original change: undetermined

Change-Id: Iba758cc3d55ee5f0f1d2df04fd476ef61ea065fd
parents 8ef081fc e0c3d791
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1500,7 +1500,7 @@ void AudioMixerBase::TrackBase::track__Resample(TO* out, size_t outFrameCount, T
    ALOGVV("track__Resample\n");
    mResampler->setSampleRate(sampleRate);
    const bool ramp = needsRamp();
    if (MIXTYPE == MIXTYPE_MONOEXPAND || MIXTYPE == MIXTYPE_STEREOEXPAND
    if (MIXTYPE == MIXTYPE_MONOEXPAND || MIXTYPE == MIXTYPE_STEREOEXPAND // custom volume handling
            || ramp || aux != NULL) {
        // if ramp:        resample with unity gain to temp buffer and scale/mix in 2nd step.
        // if aux != NULL: resample with unity gain to temp buffer then apply send level.
+2 −1
Original line number Diff line number Diff line
@@ -236,7 +236,8 @@ void stereoVolumeHelper(TO*& out, const TI*& in, const TV *vol, F f) {
            || MIXTYPE == MIXTYPE_MULTI_SAVEONLY_STEREOVOL
            || MIXTYPE == MIXTYPE_STEREOEXPAND);
    auto proc = [](auto& a, const auto& b) {
        if constexpr (MIXTYPE == MIXTYPE_MULTI_STEREOVOL) {
        if constexpr (MIXTYPE == MIXTYPE_MULTI_STEREOVOL
                || MIXTYPE == MIXTYPE_STEREOEXPAND) {
            a += b;
        } else {
            a = b;