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

Commit 7b0971cd authored by Ricardo Garcia's avatar Ricardo Garcia Committed by Android Git Automerger
Browse files

am b95d6400: am 7f3f2fa3: Merge "MediaServer crashing and audio effects not...

am b95d6400: am 7f3f2fa3: Merge "MediaServer crashing and audio effects not applied to TTS." into lmp-dev

* commit 'b95d6400':
  MediaServer crashing and audio effects not applied to TTS.
parents 9f46c204 b95d6400
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1387,7 +1387,12 @@ void AudioFlinger::EffectChain::clearInputBuffer()
// Must be called with EffectChain::mLock locked
void AudioFlinger::EffectChain::clearInputBuffer_l(sp<ThreadBase> thread)
{
    memset(mInBuffer, 0, thread->frameCount() * thread->frameSize());
    // TODO: This will change in the future, depending on multichannel
    // and sample format changes for effects.
    // Currently effects processing is only available for stereo, AUDIO_FORMAT_PCM_16_BIT
    // (4 bytes frame size)
    const size_t frameSize = audio_bytes_per_sample(AUDIO_FORMAT_PCM_16_BIT) * FCC_2;
    memset(mInBuffer, 0, thread->frameCount() * frameSize);
}

// Must be called with EffectChain::mLock locked