Loading services/audioflinger/FastMixer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -416,7 +416,7 @@ void FastMixer::onWork() } if (mMasterMono.load()) { // memory_order_seq_cst mono_blend(mMixerBuffer, mMixerBufferFormat, Format_channelCount(mFormat), frameCount); mono_blend(mMixerBuffer, mMixerBufferFormat, Format_channelCount(mFormat), frameCount, true /*limit*/); } // prepare the buffer used to write to sink void *buffer = mSinkBuffer != NULL ? mSinkBuffer : mMixerBuffer; Loading services/audioflinger/Threads.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -2917,8 +2917,8 @@ bool AudioFlinger::PlaybackThread::threadLoop() // mono blend occurs for mixer threads only (not direct or offloaded) // and is handled here if we're going directly to the sink. if (requireMonoBlend() && !mEffectBufferValid) { mono_blend( mMixerBuffer, mMixerBufferFormat, mChannelCount, mNormalFrameCount); mono_blend(mMixerBuffer, mMixerBufferFormat, mChannelCount, mNormalFrameCount, true /*limit*/); } memcpy_by_audio_format(buffer, format, mMixerBuffer, mMixerBufferFormat, Loading Loading @@ -2958,7 +2958,8 @@ bool AudioFlinger::PlaybackThread::threadLoop() //ALOGV("writing effect buffer to sink buffer format %#x", mFormat); if (requireMonoBlend()) { mono_blend(mEffectBuffer, mEffectBufferFormat, mChannelCount, mNormalFrameCount); mono_blend(mEffectBuffer, mEffectBufferFormat, mChannelCount, mNormalFrameCount, true /*limit*/); } memcpy_by_audio_format(mSinkBuffer, mFormat, mEffectBuffer, mEffectBufferFormat, Loading services/audioflinger/Threads.h +2 −0 Original line number Diff line number Diff line Loading @@ -927,6 +927,8 @@ protected: } } // the FastMixer performs mono blend if it exists. // Blending with limiter is not idempotent, // and blending without limiter is idempotent but inefficient to do twice. virtual bool requireMonoBlend() { return mMasterMono.load() && !hasFastMixer(); } }; Loading Loading
services/audioflinger/FastMixer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -416,7 +416,7 @@ void FastMixer::onWork() } if (mMasterMono.load()) { // memory_order_seq_cst mono_blend(mMixerBuffer, mMixerBufferFormat, Format_channelCount(mFormat), frameCount); mono_blend(mMixerBuffer, mMixerBufferFormat, Format_channelCount(mFormat), frameCount, true /*limit*/); } // prepare the buffer used to write to sink void *buffer = mSinkBuffer != NULL ? mSinkBuffer : mMixerBuffer; Loading
services/audioflinger/Threads.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -2917,8 +2917,8 @@ bool AudioFlinger::PlaybackThread::threadLoop() // mono blend occurs for mixer threads only (not direct or offloaded) // and is handled here if we're going directly to the sink. if (requireMonoBlend() && !mEffectBufferValid) { mono_blend( mMixerBuffer, mMixerBufferFormat, mChannelCount, mNormalFrameCount); mono_blend(mMixerBuffer, mMixerBufferFormat, mChannelCount, mNormalFrameCount, true /*limit*/); } memcpy_by_audio_format(buffer, format, mMixerBuffer, mMixerBufferFormat, Loading Loading @@ -2958,7 +2958,8 @@ bool AudioFlinger::PlaybackThread::threadLoop() //ALOGV("writing effect buffer to sink buffer format %#x", mFormat); if (requireMonoBlend()) { mono_blend(mEffectBuffer, mEffectBufferFormat, mChannelCount, mNormalFrameCount); mono_blend(mEffectBuffer, mEffectBufferFormat, mChannelCount, mNormalFrameCount, true /*limit*/); } memcpy_by_audio_format(mSinkBuffer, mFormat, mEffectBuffer, mEffectBufferFormat, Loading
services/audioflinger/Threads.h +2 −0 Original line number Diff line number Diff line Loading @@ -927,6 +927,8 @@ protected: } } // the FastMixer performs mono blend if it exists. // Blending with limiter is not idempotent, // and blending without limiter is idempotent but inefficient to do twice. virtual bool requireMonoBlend() { return mMasterMono.load() && !hasFastMixer(); } }; Loading