diff options
author | Deyao Ren <deyaoren@google.com> | 2023-06-22 16:52:05 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-06-22 16:52:17 +0000 |
commit | bb1056c7a0b7e8e07e0827a22f006834632316b3 (patch) | |
tree | ba757f5c028fab67f46847960acb9e66c4d4579d | |
parent | 30e6720ab95b4a25ac505f4868df67d6c09c6ac7 (diff) |
Revert "audioflinger: Normalize FrameCount for duplicating thread"
Revert submission 1422968-am-2bfe4e89-8194-4a9c-b20d-19fbc2942988
Reason for revert:
error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
if (mType == MIXER || isDup && (kUseFastMixer == FastMixer_Static ||
~~ ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
frameworks/av/services/audioflinger/Threads.cpp:3153:33: note: place parentheses around the '&&' expression to silence this warning
if (mType == MIXER || isDup && (kUseFastMixer == FastMixer_Static ||
^
(
Reverted changes: /q/submissionid:1422968-am-2bfe4e89-8194-4a9c-b20d-19fbc2942988
Change-Id: I9115a3cc8eddb2de88e4c4059f5aac72bea0ef40
-rw-r--r-- | services/audioflinger/Threads.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index e9ff42815c..a52b766712 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -2968,7 +2968,6 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() { // unfortunately we have no way of recovering from errors here, hence the LOG_ALWAYS_FATAL const audio_config_base_t audioConfig = mOutput->getAudioProperties(); - bool isDup = false; mSampleRate = audioConfig.sample_rate; mChannelMask = audioConfig.channel_mask; if (!audio_is_output_channel(mChannelMask)) { @@ -3051,14 +3050,10 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() // This may need to be updated as MixerThread/OutputTracks are added and not here. } - if (property_get_bool("vendor.audio.gaming.enabled", false /* default_value */) && - mType == DUPLICATING) { - isDup = true; - } // Calculate size of normal sink buffer relative to the HAL output buffer size double multiplier = 1.0; // Note: mType == SPATIALIZER does not support FastMixer. - if (mType == MIXER || isDup && (kUseFastMixer == FastMixer_Static || + if (mType == MIXER && (kUseFastMixer == FastMixer_Static || kUseFastMixer == FastMixer_Dynamic)) { size_t minNormalFrameCount = (kMinNormalSinkBufferSizeMs * mSampleRate) / 1000; size_t maxNormalFrameCount = (kMaxNormalSinkBufferSizeMs * mSampleRate) / 1000; |