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

Commit bd54eef2 authored by Jinguang Dong's avatar Jinguang Dong Committed by android-build-merger
Browse files

Merge "framework/av: fixbug for mistake clear mainbuffer data, root cause by...

Merge "framework/av: fixbug for mistake clear mainbuffer data, root cause by not offset to fout" am: 25ef483a am: c7ad5838 am: a030efa8
am: 35c5866a

Change-Id: Ib67027c035e48e956380adf11380123b884d3c92
parents 76d73bce 35c5866a
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -1611,8 +1611,13 @@ void AudioMixer::process__OneTrack16BitsStereoNoResampling(state_t* state)
        // in == NULL can happen if the track was flushed just after having
        // in == NULL can happen if the track was flushed just after having
        // been enabled for mixing.
        // been enabled for mixing.
        if (in == NULL || (((uintptr_t)in) & 3)) {
        if (in == NULL || (((uintptr_t)in) & 3)) {
            memset(out, 0, numFrames
            if ( AUDIO_FORMAT_PCM_FLOAT == t.mMixerFormat ) {
                 memset((char*)fout, 0, numFrames
                         * t.mMixerChannelCount * audio_bytes_per_sample(t.mMixerFormat));
            } else {
                 memset((char*)out, 0, numFrames
                         * t.mMixerChannelCount * audio_bytes_per_sample(t.mMixerFormat));
                         * t.mMixerChannelCount * audio_bytes_per_sample(t.mMixerFormat));
            }
            ALOGE_IF((((uintptr_t)in) & 3),
            ALOGE_IF((((uintptr_t)in) & 3),
                    "process__OneTrack16BitsStereoNoResampling: misaligned buffer"
                    "process__OneTrack16BitsStereoNoResampling: misaligned buffer"
                    " %p track %d, channels %d, needs %08x, volume %08x vfl %f vfr %f",
                    " %p track %d, channels %d, needs %08x, volume %08x vfl %f vfr %f",