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

Commit a6018899 authored by Andy Hung's avatar Andy Hung
Browse files

AudioMixer: Fix aux effect pointer computation

Test: Solo Tester + BT + Preset Reverb Aux Effect
Bug: 73723887
Change-Id: Ia765d49214bf855737d0d28a1ba08ba44267aed0
parent 08de5c23
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -1393,13 +1393,12 @@ void AudioMixer::process__genericResampling()
                    // been enabled for mixing.
                    if (t->mIn == nullptr) break;

                    if (CC_UNLIKELY(aux != NULL)) {
                        aux += outFrames;
                    }
                    (t.get()->*t->hook)(
                            outTemp + outFrames * t->mMixerChannelCount, t->buffer.frameCount,
                            mResampleTemp.get() /* naked ptr */, aux);
                            mResampleTemp.get() /* naked ptr */,
                            aux != nullptr ? aux + outFrames : nullptr);
                    outFrames += t->buffer.frameCount;

                    t->bufferProvider->releaseBuffer(&t->buffer);
                }
            }
@@ -1687,7 +1686,7 @@ void AudioMixer::process__noResampleOneTrack()

        out += outFrames * channels;
        if (aux != NULL) {
            aux += channels;
            aux += outFrames;
        }
        numFrames -= b.frameCount;